diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index ecd1798..5c75722 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -4845,3 +4845,39 @@ index 8f4f663..b0a7e09 100644 } } +diff --git a/policycoreutils/setsebool/setsebool.c b/policycoreutils/setsebool/setsebool.c +index dc037dd..d6c041b 100644 +--- a/policycoreutils/setsebool/setsebool.c ++++ b/policycoreutils/setsebool/setsebool.c +@@ -82,8 +82,13 @@ static int selinux_set_boolean_list(size_t boolcnt, + if (errno == ENOENT) + fprintf(stderr, "Could not change active booleans: " + "Invalid boolean\n"); +- else if (errno) +- perror("Could not change active booleans"); ++ else if (errno) { ++ if (getuid() == 0) { ++ perror("Could not change active booleans"); ++ } else { ++ perror("Could not change active booleans. Please try as root"); ++ } ++ } + + return -1; + } +@@ -115,8 +120,13 @@ static int semanage_set_boolean_list(size_t boolcnt, + goto err; + + } else if (managed == 0) { +- fprintf(stderr, +- "Cannot set persistent booleans without managed policy.\n"); ++ if (getuid() == 0) { ++ fprintf(stderr, ++ "Cannot set persistent booleans without managed policy.\n"); ++ } else { ++ fprintf(stderr, ++ "Cannot set persistent booleans, please try as root.\n"); ++ } + goto err; + } + diff --git a/policycoreutils.spec b/policycoreutils.spec index cc41b91..62f5dfe 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -7,7 +7,7 @@ Summary: SELinux policy core utilities Name: policycoreutils Version: 2.0.85 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base # Based on git repository with tag 20101221 @@ -329,9 +329,10 @@ fi exit 0 %changelog -* Tue Jan 4 2011 Dan Walsh 2.0.85-3 +* Wed Jan 5 2011 Dan Walsh 2.0.85-3 - Polgengui raises the wrong type of exception. #471078 - Change semanage to not allow it to semanage module -D +- Change setsebool to suggest run as root on failure * Wed Dec 22 2010 Dan Walsh 2.0.85-2 - Fix restorecond watching utmp file for people logging in our out