libsemanage/libsemanage-rhat.patch

46 lines
1.6 KiB
Diff
Raw Normal View History

diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.33/src/genhomedircon.c
--- nsalibsemanage/src/genhomedircon.c 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.33/src/genhomedircon.c 2009-07-10 14:46:05.000000000 -0400
@@ -794,6 +794,10 @@
* /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.33/src/semanage.conf
--- nsalibsemanage/src/semanage.conf 2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.33/src/semanage.conf 2009-07-10 14:45:44.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
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage_store.c libsemanage-2.0.33/src/semanage_store.c
2009-07-07 21:09:15 +00:00
--- nsalibsemanage/src/semanage_store.c 2009-07-07 15:32:32.000000000 -0400
+++ libsemanage-2.0.33/src/semanage_store.c 2009-07-10 14:45:44.000000000 -0400
@@ -441,8 +441,6 @@
2009-01-15 20:56:45 +00:00
char tmp[PATH_MAX];
char buf[4192];
- if (link(src,dst) == 0) return 0;
-
n = snprintf(tmp, PATH_MAX, "%s.tmp", dst);
if (n < 0 || n >= PATH_MAX)
return -1;
@@ -510,7 +508,8 @@
2009-01-15 20:56:45 +00:00
goto cleanup;
}
} else if (S_ISREG(sb.st_mode)) {
- if (semanage_copy_file(path, path2, sb.st_mode) == -1) {
+ if ((link(path,path2) == -1) &&
+ (semanage_copy_file(path, path2, sb.st_mode) == -1)) {
goto cleanup;
}
}