|
|
23c8d43 |
diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.2/Makefile
|
|
|
2f91eb2 |
--- nsapolicycoreutils/Makefile 2006-11-16 17:15:00.000000000 -0500
|
|
|
23c8d43 |
+++ policycoreutils-2.0.2/Makefile 2007-02-20 17:00:14.000000000 -0500
|
|
|
06b3267 |
@@ -1,4 +1,4 @@
|
|
|
06b3267 |
-SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
|
|
|
06b3267 |
+SUBDIRS=setfiles semanage load_policy newrole run_init restorecon restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
|
|
|
06b3267 |
|
|
|
06b3267 |
all install relabel clean indent:
|
|
|
06b3267 |
@for subdir in $(SUBDIRS); do \
|
|
|
23c8d43 |
diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.2/newrole/newrole.c
|
|
|
23c8d43 |
--- nsapolicycoreutils/newrole/newrole.c 2007-01-24 10:03:59.000000000 -0500
|
|
|
23c8d43 |
+++ policycoreutils-2.0.2/newrole/newrole.c 2007-02-20 17:00:14.000000000 -0500
|
|
|
23c8d43 |
@@ -640,11 +640,12 @@
|
|
|
23c8d43 |
}
|
|
|
23c8d43 |
|
|
|
23c8d43 |
/* Re-open TTY descriptor */
|
|
|
23c8d43 |
- fd = open(ttyn, O_RDWR);
|
|
|
23c8d43 |
+ fd = open(ttyn, O_RDWR|O_NONBLOCK);
|
|
|
23c8d43 |
if (fd < 0) {
|
|
|
23c8d43 |
fprintf(stderr, _("Error! Could not open %s.\n"), ttyn);
|
|
|
23c8d43 |
return fd;
|
|
|
23c8d43 |
}
|
|
|
23c8d43 |
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK);
|
|
|
23c8d43 |
|
|
|
23c8d43 |
if (fgetfilecon(fd, &tty_con) < 0) {
|
|
|
23c8d43 |
fprintf(stderr, _("%s! Could not get current context "
|
|
|
23c8d43 |
@@ -1131,15 +1132,18 @@
|
|
|
23c8d43 |
fprintf(stderr, _("Could not close descriptors.\n"));
|
|
|
23c8d43 |
goto err_close_pam;
|
|
|
23c8d43 |
}
|
|
|
23c8d43 |
- fd = open(ttyn, O_RDONLY);
|
|
|
23c8d43 |
+ fd = open(ttyn, O_RDONLY|O_NONBLOCK);
|
|
|
23c8d43 |
if (fd != 0)
|
|
|
23c8d43 |
goto err_close_pam;
|
|
|
23c8d43 |
- fd = open(ttyn, O_RDWR);
|
|
|
23c8d43 |
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK);
|
|
|
23c8d43 |
+ fd = open(ttyn, O_RDWR|O_NONBLOCK);
|
|
|
23c8d43 |
if (fd != 1)
|
|
|
23c8d43 |
goto err_close_pam;
|
|
|
23c8d43 |
- fd = open(ttyn, O_RDWR);
|
|
|
23c8d43 |
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK);
|
|
|
23c8d43 |
+ fd = open(ttyn, O_RDWR|O_NONBLOCK);
|
|
|
23c8d43 |
if (fd != 2)
|
|
|
23c8d43 |
goto err_close_pam;
|
|
|
23c8d43 |
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK);
|
|
|
23c8d43 |
|
|
|
23c8d43 |
/*
|
|
|
23c8d43 |
* Step 5: Execute a new shell with the new context in `new_context'.
|
|
|
23c8d43 |
diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.2/restorecond/restorecond.c
|
|
|
23c8d43 |
--- nsapolicycoreutils/restorecond/restorecond.c 2007-02-22 08:53:22.000000000 -0500
|
|
|
23c8d43 |
+++ policycoreutils-2.0.2/restorecond/restorecond.c 2007-02-20 17:00:14.000000000 -0500
|
|
|
9a06a71 |
@@ -210,9 +210,10 @@
|
|
|
9a06a71 |
}
|
|
|
9a06a71 |
|
|
|
9a06a71 |
if (fsetfilecon(fd, scontext) < 0) {
|
|
|
9a06a71 |
- syslog(LOG_ERR,
|
|
|
9a06a71 |
- "set context %s->%s failed:'%s'\n",
|
|
|
9a06a71 |
- filename, scontext, strerror(errno));
|
|
|
9a06a71 |
+ if (errno != EOPNOTSUPP)
|
|
|
9a06a71 |
+ syslog(LOG_ERR,
|
|
|
9a06a71 |
+ "set context %s->%s failed:'%s'\n",
|
|
|
9a06a71 |
+ filename, scontext, strerror(errno));
|
|
|
9a06a71 |
if (retcontext >= 0)
|
|
|
9a06a71 |
free(prev_context);
|
|
|
9a06a71 |
free(scontext);
|
|
|
9a06a71 |
@@ -225,8 +226,9 @@
|
|
|
9a06a71 |
if (retcontext >= 0)
|
|
|
9a06a71 |
free(prev_context);
|
|
|
9a06a71 |
} else {
|
|
|
9a06a71 |
- syslog(LOG_ERR, "get context on %s failed: '%s'\n",
|
|
|
9a06a71 |
- filename, strerror(errno));
|
|
|
9a06a71 |
+ if (errno != EOPNOTSUPP)
|
|
|
9a06a71 |
+ syslog(LOG_ERR, "get context on %s failed: '%s'\n",
|
|
|
9a06a71 |
+ filename, strerror(errno));
|
|
|
9a06a71 |
}
|
|
|
9a06a71 |
free(scontext);
|
|
|
9a06a71 |
close(fd);
|
|
|
23c8d43 |
@@ -481,8 +483,6 @@
|
|
|
23c8d43 |
|
|
|
23c8d43 |
watch_list_free(master_fd);
|
|
|
23c8d43 |
close(master_fd);
|
|
|
23c8d43 |
- matchpathcon_fini();
|
|
|
23c8d43 |
- utmpwatcher_free();
|
|
|
23c8d43 |
if (pidfile)
|
|
|
23c8d43 |
unlink(pidfile);
|
|
|
23c8d43 |
|
|
|
23c8d43 |
diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.2/restorecond/restorecond.conf
|
|
|
97069f5 |
--- nsapolicycoreutils/restorecond/restorecond.conf 2006-11-20 12:19:55.000000000 -0500
|
|
|
23c8d43 |
+++ policycoreutils-2.0.2/restorecond/restorecond.conf 2007-02-20 17:00:14.000000000 -0500
|
|
|
1ce1f8e |
@@ -1,7 +1,9 @@
|
|
|
97069f5 |
/etc/resolv.conf
|
|
|
97069f5 |
+/etc/localtime
|
|
|
97069f5 |
/etc/samba/secrets.tdb
|
|
|
97069f5 |
/etc/mtab
|
|
|
97069f5 |
/var/run/utmp
|
|
|
1ce1f8e |
+/var/run/faillog
|
|
|
1ce1f8e |
/var/log/wtmp
|
|
|
1ce1f8e |
~/public_html
|
|
|
1ce1f8e |
~/.mozilla/plugins/libflashplayer.so
|
|
|
23c8d43 |
diff --exclude-from=exclude --exclude=sepolgen-1.0.0 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.2/semanage/seobject.py
|
|
|
23c8d43 |
--- nsapolicycoreutils/semanage/seobject.py 2007-02-22 08:53:22.000000000 -0500
|
|
|
23c8d43 |
+++ policycoreutils-2.0.2/semanage/seobject.py 2007-02-20 17:00:14.000000000 -0500
|
|
|
23c8d43 |
@@ -209,6 +209,7 @@
|
|
|
36c9fbc |
os.write(fd, self.out())
|
|
|
36c9fbc |
os.close(fd)
|
|
|
36c9fbc |
os.rename(newfilename, self.filename)
|
|
|
36c9fbc |
+ os.system("/sbin/service mcstrans reload > /dev/null")
|
|
|
23c8d43 |
|
|
|
36c9fbc |
class semanageRecords:
|
|
|
36c9fbc |
def __init__(self):
|