|
|
6265db0 |
diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/matchpathcon.8 libselinux-2.0.12/man/man8/matchpathcon.8
|
|
|
47b511b |
--- nsalibselinux/man/man8/matchpathcon.8 2007-01-17 11:11:35.000000000 -0500
|
|
|
6265db0 |
+++ libselinux-2.0.12/man/man8/matchpathcon.8 2007-04-12 12:29:25.000000000 -0400
|
|
|
47b511b |
@@ -28,4 +28,4 @@
|
|
|
47b511b |
|
|
|
47b511b |
.SH "SEE ALSO"
|
|
|
47b511b |
.BR selinux "(8), "
|
|
|
47b511b |
-.BR mathpathcon "(3), "
|
|
|
47b511b |
+.BR matchpathcon "(3), "
|
|
|
6265db0 |
Binary files nsalibselinux/src/selinux.pyc and libselinux-2.0.12/src/selinux.pyc differ
|
|
|
6265db0 |
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.12/src/selinuxswig.i
|
|
|
ff4b4da |
--- nsalibselinux/src/selinuxswig.i 2007-02-22 08:53:23.000000000 -0500
|
|
|
6265db0 |
+++ libselinux-2.0.12/src/selinuxswig.i 2007-04-12 12:39:51.000000000 -0400
|
|
|
6265db0 |
@@ -44,6 +44,8 @@
|
|
|
6265db0 |
|
|
|
6265db0 |
extern int is_selinux_enabled(void);
|
|
|
6265db0 |
extern int is_selinux_mls_enabled(void);
|
|
|
6265db0 |
+extern void freecon(security_context_t con);
|
|
|
6265db0 |
+extern void freeconary(security_context_t * con);
|
|
|
6265db0 |
extern int getcon(security_context_t *con);
|
|
|
6265db0 |
extern int setcon(security_context_t con);
|
|
|
6265db0 |
extern int getpidcon(int pid, security_context_t *con);
|
|
|
6265db0 |
@@ -90,6 +92,11 @@
|
|
|
6265db0 |
mode_t mode,
|
|
|
6265db0 |
security_context_t *con);
|
|
|
6265db0 |
|
|
|
6265db0 |
+extern int matchpathcon_init_prefix(const char *path,
|
|
|
6265db0 |
+ const char *prefix);
|
|
|
6265db0 |
+extern void matchpathcon_fini(void);
|
|
|
6265db0 |
+
|
|
|
6265db0 |
+
|
|
|
6265db0 |
extern int matchmediacon(const char *media,
|
|
|
6265db0 |
security_context_t *con);
|
|
|
6265db0 |
|
|
|
6265db0 |
@@ -106,6 +113,7 @@
|
|
|
6265db0 |
extern const char *selinux_homedir_context_path(void);
|
|
|
6265db0 |
extern const char *selinux_media_context_path(void);
|
|
|
6265db0 |
extern const char *selinux_contexts_path(void);
|
|
|
6265db0 |
+extern const char *selinux_securetty_types_path(void);
|
|
|
6265db0 |
extern const char *selinux_booleans_path(void);
|
|
|
6265db0 |
extern const char *selinux_customizable_types_path(void);
|
|
|
6265db0 |
extern const char *selinux_users_path(void);
|
|
|
6265db0 |
@@ -113,11 +121,43 @@
|
|
|
6265db0 |
extern const char *selinux_translations_path(void);
|
|
|
6265db0 |
extern const char *selinux_netfilter_context_path(void);
|
|
|
ff4b4da |
extern const char *selinux_path(void);
|
|
|
6265db0 |
-extern int selinux_check_passwd_access(access_vector_t requested);
|
|
|
6265db0 |
-extern int checkPasswdAccess(access_vector_t requested);
|
|
|
6265db0 |
+#extern int selinux_check_passwd_access(access_vector_t requested);
|
|
|
6265db0 |
+#extern int checkPasswdAccess(access_vector_t requested);
|
|
|
6265db0 |
+
|
|
|
6265db0 |
+extern int selinux_check_securetty_context(security_context_t tty_context);
|
|
|
6265db0 |
+void set_selinuxmnt(char *mnt);
|
|
|
ff4b4da |
+
|
|
|
ff4b4da |
+// This tells SWIG to treat char ** as a special case
|
|
|
47b511b |
+%typemap(python,in) char ** {
|
|
|
ff4b4da |
+ /* Check if is a list */
|
|
|
ff4b4da |
+ if (PyList_Check($input)) {
|
|
|
ff4b4da |
+ int size = PyList_Size($input);
|
|
|
ff4b4da |
+ int i = 0;
|
|
|
ff4b4da |
+ $1 = (char **) malloc((size+1)*sizeof(char *));
|
|
|
47b511b |
+ if ($1 == NULL) {
|
|
|
47b511b |
+ PyErr_SetString(PyExc_MemoryError,"Out of memory");
|
|
|
47b511b |
+ return NULL;
|
|
|
47b511b |
+ }
|
|
|
ff4b4da |
+ for (i = 0; i < size; i++) {
|
|
|
ff4b4da |
+ PyObject *o = PyList_GetItem($input,i);
|
|
|
ff4b4da |
+ if (PyString_Check(o))
|
|
|
ff4b4da |
+ $1[i] = PyString_AsString(PyList_GetItem($input,i));
|
|
|
ff4b4da |
+ else {
|
|
|
ff4b4da |
+ PyErr_SetString(PyExc_TypeError,"list must contain strings");
|
|
|
ff4b4da |
+ free($1);
|
|
|
ff4b4da |
+ return NULL;
|
|
|
ff4b4da |
+ }
|
|
|
ff4b4da |
+ }
|
|
|
ff4b4da |
+ $1[i] = 0;
|
|
|
ff4b4da |
+ } else {
|
|
|
ff4b4da |
+ PyErr_SetString(PyExc_TypeError,"not a list");
|
|
|
ff4b4da |
+ return NULL;
|
|
|
ff4b4da |
+ }
|
|
|
ff4b4da |
+}
|
|
|
ff4b4da |
+
|
|
|
ff4b4da |
extern int rpm_execcon(unsigned int verified,
|
|
|
ff4b4da |
const char *filename,
|
|
|
ff4b4da |
- char *const argv[], char *const envp[]);
|
|
|
ff4b4da |
+ char **, char **);
|
|
|
ff4b4da |
|
|
|
ff4b4da |
extern int is_context_customizable (security_context_t scontext);
|
|
|
ff4b4da |
|
|
|
6265db0 |
@@ -135,3 +175,7 @@
|
|
|
6265db0 |
}
|
|
|
6265db0 |
extern int selinux_getpolicytype(char **enforce);
|
|
|
6265db0 |
extern int getseuserbyname(const char *linuxuser, char **seuser, char **level);
|
|
|
6265db0 |
+
|
|
|
6265db0 |
+int selinux_file_context_cmp(const security_context_t a, const security_context_t b);
|
|
|
6265db0 |
+int selinux_file_context_verify(const char *path, mode_t mode);
|
|
|
6265db0 |
+int selinux_lsetfilecon_default(const char *path);
|
|
|
6265db0 |
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getsebool.c libselinux-2.0.12/utils/getsebool.c
|
|
|
c7862e5 |
--- nsalibselinux/utils/getsebool.c 2006-11-16 17:15:17.000000000 -0500
|
|
|
6265db0 |
+++ libselinux-2.0.12/utils/getsebool.c 2007-04-12 12:29:25.000000000 -0400
|
|
|
47b511b |
@@ -14,7 +14,7 @@
|
|
|
47b511b |
|
|
|
47b511b |
int main(int argc, char **argv)
|
|
|
47b511b |
{
|
|
|
47b511b |
- int i, rc = 0, active, pending, len = 0, opt;
|
|
|
47b511b |
+ int i, get_all = 0, rc = 0, active, pending, len = 0, opt;
|
|
|
47b511b |
char **names;
|
|
|
47b511b |
|
|
|
47b511b |
while ((opt = getopt(argc, argv, "a")) > 0) {
|
|
|
47b511b |
@@ -39,6 +39,7 @@
|
|
|
47b511b |
printf("No booleans\n");
|
|
|
47b511b |
return 0;
|
|
|
47b511b |
}
|
|
|
47b511b |
+ get_all = 1;
|
|
|
47b511b |
break;
|
|
|
47b511b |
default:
|
|
|
47b511b |
usage(argv[0]);
|
|
|
47b511b |
@@ -72,6 +73,8 @@
|
|
|
22298b4 |
for (i = 0; i < len; i++) {
|
|
|
22298b4 |
active = security_get_boolean_active(names[i]);
|
|
|
22298b4 |
if (active < 0) {
|
|
|
47b511b |
+ if (get_all && errno == EACCES)
|
|
|
47b511b |
+ continue;
|
|
|
47b511b |
fprintf(stderr, "Error getting active value for %s\n",
|
|
|
47b511b |
names[i]);
|
|
|
47b511b |
rc = -1;
|