pam/pam-1.0.0-sepermit-screensaver.patch

17 lines
648 B
Diff
Raw Normal View History

Index: pam_sepermit.c
===================================================================
RCS file: /cvsroot/pam/Linux-PAM/modules/pam_sepermit/pam_sepermit.c,v
retrieving revision 1.3
diff -u -p -r1.3 pam_sepermit.c
--- Linux-PAM/modules/pam_sepermit/pam_sepermit.c.orig 31 Mar 2008 10:31:50 -0000 1.3
+++ Linux-PAM/modules/pam_sepermit/pam_sepermit.c 15 Apr 2008 16:30:38 -0000
@@ -305,7 +305,7 @@ sepermit_match(pam_handle_t *pamh, const
free(line);
fclose(f);
if (matched)
- return exclusive ? sepermit_lock(pamh, user, debug) : 0;
+ return (geteuid() == 0 && exclusive) ? sepermit_lock(pamh, user, debug) : 0;
else
return -1;
}