2006-10-20 13:08:28 +00:00
|
|
|
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-1.32/newrole/newrole.c
|
|
|
|
--- nsapolicycoreutils/newrole/newrole.c 2006-09-29 11:50:09.000000000 -0400
|
|
|
|
+++ policycoreutils-1.32/newrole/newrole.c 2006-10-20 09:04:57.000000000 -0400
|
|
|
|
@@ -680,6 +680,7 @@
|
|
|
|
{
|
|
|
|
fprintf(stderr, _("newrole: incorrect password for %s\n"),
|
|
|
|
pw->pw_name);
|
|
|
|
+ send_audit_message(0, old_context, new_context, ttyn);
|
|
|
|
return (-1);
|
2006-09-21 21:04:29 +00:00
|
|
|
}
|
2006-10-20 13:08:28 +00:00
|
|
|
/* If we reach here, then we have authenticated the user. */
|
|
|
|
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-1.32/restorecond/Makefile
|
2006-09-21 21:04:29 +00:00
|
|
|
--- nsapolicycoreutils/restorecond/Makefile 2006-08-28 16:58:19.000000000 -0400
|
2006-10-20 13:08:28 +00:00
|
|
|
+++ policycoreutils-1.32/restorecond/Makefile 2006-10-17 12:59:55.000000000 -0400
|
2006-09-29 18:12:05 +00:00
|
|
|
@@ -5,8 +5,9 @@
|
2006-09-21 21:04:29 +00:00
|
|
|
INITDIR = $(DESTDIR)/etc/rc.d/init.d
|
|
|
|
SELINUXDIR = $(DESTDIR)/etc/selinux
|
|
|
|
|
|
|
|
-CFLAGS ?= -g -Werror -Wall -W
|
2006-09-21 21:17:30 +00:00
|
|
|
-override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64
|
2006-09-29 18:12:05 +00:00
|
|
|
+LDFLAGS ?= -pie
|
2006-09-21 21:17:30 +00:00
|
|
|
+CFLAGS ?= -g -Werror -Wall -W
|
|
|
|
+override CFLAGS += -I$(PREFIX)/include -D_FILE_OFFSET_BITS=64 -fPIE
|
2006-09-21 21:04:29 +00:00
|
|
|
LDLIBS += -lselinux -lsepol -L$(PREFIX)/lib
|
|
|
|
|
|
|
|
all: restorecond
|
2006-10-20 13:08:28 +00:00
|
|
|
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-1.32/semanage/semanage.8
|
|
|
|
--- nsapolicycoreutils/semanage/semanage.8 2006-09-14 08:07:24.000000000 -0400
|
|
|
|
+++ policycoreutils-1.32/semanage/semanage.8 2006-10-19 07:55:00.000000000 -0400
|
|
|
|
@@ -7,7 +7,7 @@
|
|
|
|
.br
|
|
|
|
.B semanage login \-{a|d|m} [\-sr] login_name
|
|
|
|
.br
|
|
|
|
-.B semanage user \-{a|d|m} [\-LrR] selinux_name
|
|
|
|
+.B semanage user \-{a|d|m} [\-LrRP] selinux_name
|
|
|
|
.br
|
|
|
|
.B semanage port \-{a|d|m} [\-tr] [\-p protocol] port | port_range
|
|
|
|
.br
|
|
|
|
@@ -71,6 +71,9 @@
|
|
|
|
.I \-R, \-\-role
|
|
|
|
SELinux Roles. You must enclose multiple roles within quotes, separate by spaces. Or specify \-R multiple times.
|
|
|
|
.TP
|
|
|
|
+.I \-P, \-\-prefix
|
|
|
|
+SELinux Prefix. Prefix added to home_dir_t and home_t for labeling users home directories.
|
|
|
|
+.TP
|
|
|
|
.I \-s, \-\-seuser
|
|
|
|
SELinux user name
|
|
|
|
.TP
|
|
|
|
diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-1.32/semanage/seobject.py
|
|
|
|
--- nsapolicycoreutils/semanage/seobject.py 2006-10-17 12:04:55.000000000 -0400
|
|
|
|
+++ policycoreutils-1.32/semanage/seobject.py 2006-10-17 12:59:55.000000000 -0400
|
2006-09-25 14:01:37 +00:00
|
|
|
@@ -456,7 +456,8 @@
|
2006-09-23 23:35:08 +00:00
|
|
|
rc = semanage_user_set_mlslevel(self.sh, u, selevel)
|
|
|
|
if rc < 0:
|
|
|
|
raise ValueError(_("Could not set MLS level for %s") % name)
|
|
|
|
-
|
2006-09-29 18:12:05 +00:00
|
|
|
+ if selinux.security_check_context("system_u:object_r:%s_home_t:s0" % prefix) != 0:
|
2006-09-23 23:35:08 +00:00
|
|
|
+ raise ValueError(_("Invalid prefix %s") % prefix)
|
|
|
|
rc = semanage_user_set_prefix(self.sh, u, prefix)
|
|
|
|
if rc < 0:
|
|
|
|
raise ValueError(_("Could not add prefix %s for %s") % (r, prefix))
|
2006-10-20 13:08:28 +00:00
|
|
|
@@ -522,7 +523,9 @@
|
2006-09-23 23:35:08 +00:00
|
|
|
semanage_user_set_mlslevel(self.sh, u, untranslate(selevel))
|
|
|
|
|
|
|
|
if prefix != "":
|
|
|
|
- semanage_user_set_prefix(self.sh, u, prefix)
|
|
|
|
+ if selinux.security_check_context("system_u:object_r:%s_home_t" % prefix) != 0:
|
|
|
|
+ raise ValueError(_("Invalid prefix %s") % prefix)
|
|
|
|
+ semanage_user_set_prefix(self.sh, u, prefix)
|
|
|
|
|
|
|
|
if len(roles) != 0:
|
|
|
|
for r in roles:
|