Author: Daniel J Walsh

Email: dwalsh@redhat.com
Subject: libsemanage patch
Date: Wed, 16 Sep 2009 13:27:25 -0400

Updated patch.  Need check in two places.

Signed-off-by: Joshua Brindle <method@manicmethod.com>
This commit is contained in:
Daniel J Walsh 2009-09-16 16:56:54 -04:00 committed by Joshua Brindle
parent 71178d5669
commit faff0a77c6

View File

@ -304,6 +304,10 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s)
continue;
if (!semanage_list_find(shells, pwbuf->pw_shell))
continue;
int len = strlen(pwbuf->pw_dir) -1;
for(; len > 0 && pwbuf->pw_dir[len] == '/'; len--) {
pwbuf->pw_dir[len] = '\0';
}
if (strcmp(pwbuf->pw_dir, "/") == 0)
continue;
if (semanage_str_count(pwbuf->pw_dir, '/') <= 1)
@ -788,6 +792,11 @@ static genhomedircon_user_entry_t *get_users(genhomedircon_settings_t * s,
continue;
}
int len = strlen(pwent->pw_dir) -1;
for(; len > 0 && pwent->pw_dir[len] == '/'; len--) {
pwent->pw_dir[len] = '\0';
}
if (strcmp(pwent->pw_dir, "/") == 0) {
/* don't relabel / genhomdircon checked to see if root
* was the user and if so, set his home directory to