diff options
author | Andreas Henriksson <andreas@fatal.se> | 2019-12-05 13:29:31 +0100 |
---|---|---|
committer | Andreas Henriksson <andreas@fatal.se> | 2019-12-05 13:29:31 +0100 |
commit | 69d932140c70455a282b6e7115d9caf0cc56d6ff (patch) | |
tree | eda18bc82cc58e5d193e608f00543b2b5b537d49 /src/chsh.c | |
parent | b28d45d2bd2462414b9dbbe38e6c7f3d5f7b462b (diff) | |
download | shadow-69d932140c70455a282b6e7115d9caf0cc56d6ff.tar.gz |
New upstream version 4.8upstream/4.8
Diffstat (limited to 'src/chsh.c')
-rw-r--r-- | src/chsh.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -39,10 +39,6 @@ #include <pwd.h> #include <stdio.h> #include <sys/types.h> -#ifdef WITH_SELINUX -#include <selinux/selinux.h> -#include <selinux/av_permissions.h> -#endif #include "defines.h" #include "getdef.h" #include "nscd.h" @@ -286,8 +282,7 @@ static void check_perms (const struct passwd *pw) * check if the change is allowed by SELinux policy. */ if ((pw->pw_uid != getuid ()) - && (is_selinux_enabled () > 0) - && (selinux_check_passwd_access (PASSWD__CHSH) != 0)) { + && (check_selinux_permit("chsh") != 0)) { SYSLOG ((LOG_WARN, "can't change shell for '%s'", pw->pw_name)); fprintf (stderr, _("You may not change the shell for '%s'.\n"), |