Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- ./src/public.h 2008-09-26 09:29:54.000000000 -0500
- +++ ./src/public.h 2013-02-24 03:18:30.539564953 -0600
- @@ -97,8 +97,6 @@
- #endif
- #ifdef WITH_SELINUX
- -extern int selinux_check_access (const char *__chuser,
- - unsigned int __access);
- extern int set_default_context (pam_handle_t *pamh,
- const char *filename,
- char **prev_context);
- --- selinux_utils.c 2013-02-24 14:31:27.672220021 -0600
- +++ selinux_utils.c 2013-02-24 14:31:53.712077129 -0600
- @@ -37,37 +37,6 @@
- #include "public.h"
- - int
- - selinux_check_access (const char *chuser, unsigned int access)
- - {
- - int status = -1;
- - security_context_t user_context;
- -
- - if (getprevcon (&user_context) == 0)
- - {
- - context_t c = context_new (user_context);
- - const char *user = context_user_get (c);
- -
- - if (strcmp (chuser, user) == 0)
- - status = 0;
- - else
- - {
- - struct av_decision avd;
- - int retval = security_compute_av (user_context,
- - user_context,
- - SECCLASS_PASSWD,
- - access,
- - &avd);
- -
- - if ((retval == 0) &&
- - ((access & avd.allowed) == access))
- - status = 0;
- - }
- - context_free (c);
- - freecon (user_context);
- - }
- - return status;
- - }
- int
- set_default_context (pam_handle_t *pamh, const char *filename,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement