6120de7432
* Fix compliation under GCC 4.6 by Justin Mattock
26 lines
827 B
Diff
26 lines
827 B
Diff
diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
|
|
index 8a7d5e2..0c5c695 100644
|
|
--- a/libsemanage/src/genhomedircon.c
|
|
+++ b/libsemanage/src/genhomedircon.c
|
|
@@ -310,6 +310,10 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s)
|
|
}
|
|
if (strcmp(pwbuf->pw_dir, "/") == 0)
|
|
continue;
|
|
+ if (strcmp(pwbuf->pw_dir, "/root") == 0) {
|
|
+ continue;
|
|
+ }
|
|
+
|
|
if (semanage_str_count(pwbuf->pw_dir, '/') <= 1)
|
|
continue;
|
|
if (!(path = strdup(pwbuf->pw_dir))) {
|
|
@@ -803,6 +807,9 @@ static genhomedircon_user_entry_t *get_users(genhomedircon_settings_t * s,
|
|
* /root */
|
|
continue;
|
|
}
|
|
+ if (strcmp(pwent->pw_dir, "/root") == 0) {
|
|
+ continue;
|
|
+ }
|
|
if (push_user_entry(&head, name, seuname,
|
|
prefix, pwent->pw_dir) != STATUS_SUCCESS) {
|
|
*errors = STATUS_ERR;
|