libselinux/libselinux-rhat.patch
2004-11-12 13:03:50 +00:00

55 lines
2.2 KiB
Diff

diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/getsebool.8 libselinux-1.19.1/man/man8/getsebool.8
--- nsalibselinux/man/man8/getsebool.8 2004-11-02 14:26:19.000000000 -0500
+++ libselinux-1.19.1/man/man8/getsebool.8 2004-11-12 08:02:41.221727482 -0500
@@ -8,13 +8,12 @@
.SH "DESCRIPTION"
.B getsebool
-reports the current state of either a particular SELinux boolean or
-all SELinux booleans. The state consists of two values, the active
-value and the pending value. The active value indicates the value
-that is presently applied to the policy. The pending value indicates
+reports where a particular SELinux boolean or
+all SELinux booleans are active or inactive.
+In certain situations a boolean can be in one state with a pending
+change to the other state. getsebool will report this as a pending change.
+The pending value indicates
the value that will be applied upon the next boolean commit.
-Typically, these values will be the same; they only differ when in the
-middle of a boolean change transaction.
The setting of boolean values occurs in two stages; first the pending
value is changed, then the booleans are committed, causing their
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getsebool.c libselinux-1.19.1/utils/getsebool.c
--- nsalibselinux/utils/getsebool.c 2004-11-09 09:13:54.000000000 -0500
+++ libselinux-1.19.1/utils/getsebool.c 2004-11-11 09:27:51.000000000 -0500
@@ -83,8 +83,14 @@
rc = -1;
goto out;
}
- printf("%s --> active: %d pending: %d\n", names[i],
- active, pending);
+ if (pending != active) {
+ printf("%s --> %s pending: %s\n", names[i],
+ ( active ? "active" : "inactive"),
+ ( pending ? "active" : "inactive"));
+ } else {
+ printf("%s --> %s\n", names[i],
+ ( active ? "active" : "inactive"));
+ }
}
out:
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/setsebool.c libselinux-1.19.1/utils/setsebool.c
--- nsalibselinux/utils/setsebool.c 2004-11-09 09:13:54.000000000 -0500
+++ libselinux-1.19.1/utils/setsebool.c 2004-11-11 09:10:41.000000000 -0500
@@ -35,6 +35,8 @@
if (strcmp(argv[1], "-P") == 0) {
permanent = 1;
+ if (argc < 3)
+ usage();
start = 2;
}
else