* sulogin picking the SELinux context was broken. Patch by Daniel Walsh

This commit is contained in:
Werner Fink
2010-04-08 09:07:36 +00:00
parent 5e919cc4ca
commit 1ef67cb310
3 changed files with 222 additions and 1 deletions

View File

@@ -444,7 +444,7 @@ void sushell(struct passwd *pwd)
char *seuser=NULL;
char *level=NULL;
if (getseuserbyname("root", &seuser, &level) == 0)
if (get_default_context_with_level(seuser, level, 0, &scon) > 0) {
if (get_default_context_with_level(seuser, level, 0, &scon) == 0) {
if (setexeccon(scon) != 0)
fprintf(stderr, "setexeccon faile\n");
freecon(scon);