libsemanage/libsemanage-rhat.patch

46 lines
1.4 KiB
Diff
Raw Normal View History

diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.35/src/genhomedircon.c
--- nsalibsemanage/src/genhomedircon.c 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.35/src/genhomedircon.c 2009-08-26 15:05:01.000000000 -0400
@@ -304,10 +304,20 @@
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)
continue;
+
+ if (strcmp(pwbuf->pw_dir, "/root") == 0) {
+ /* don't relabel /root*/
+ continue;
+ }
+
if (!(path = strdup(pwbuf->pw_dir))) {
break;
}
@@ -794,6 +804,11 @@
* /root */
continue;
}
+ if (strcmp(pwent->pw_dir, "/root") == 0) {
+ /* don't relabel /root*/
+ continue;
+ }
+
if (push_user_entry(&head, name, seuname,
prefix, pwent->pw_dir) != STATUS_SUCCESS) {
*errors = STATUS_ERR;
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.35/src/semanage.conf
--- nsalibsemanage/src/semanage.conf 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.35/src/semanage.conf 2009-08-05 15:21:56.000000000 -0400
@@ -35,4 +35,4 @@
# given in <sepol/policydb.h>. Change this setting if a different
# version is necessary.
#policy-version = 19
-
+expand-check=0