Add selinux_check_access function. Needed for passwd, chfn, chsh

This commit is contained in:
Dan Walsh 2011-10-20 16:50:40 -04:00
parent a8fa8756a9
commit 9328ed5d59

View File

@ -130,7 +130,7 @@ index b245364..7c47222 100644
rc = vfprintf(stderr, fmt, ap);
va_end(ap);
diff --git a/libselinux/src/checkAccess.c b/libselinux/src/checkAccess.c
index c1982c7..37ccc15 100644
index c1982c7..59c8abb 100644
--- a/libselinux/src/checkAccess.c
+++ b/libselinux/src/checkAccess.c
@@ -4,8 +4,40 @@
@ -168,7 +168,7 @@ index c1982c7..37ccc15 100644
+
+ if ((av = string_to_av_perm(sclass, perm)) == 0) return status;
+
+ return (avc_has_perm (scon_id, tcon_id, sclass, av, NULL, aux);
+ return avc_has_perm (scon_id, tcon_id, sclass, av, NULL, aux);
+}
+
int selinux_check_passwd_access(access_vector_t requested)