diff options
Diffstat (limited to 'modules/pam_shells')
-rw-r--r-- | modules/pam_shells/pam_shells.8 | 35 | ||||
-rw-r--r-- | modules/pam_shells/pam_shells.c | 25 |
2 files changed, 60 insertions, 0 deletions
diff --git a/modules/pam_shells/pam_shells.8 b/modules/pam_shells/pam_shells.8 new file mode 100644 index 0000000..44cbedb --- /dev/null +++ b/modules/pam_shells/pam_shells.8 @@ -0,0 +1,35 @@ +.\" OpenPAM's pam_shells man page +.\" Contact me ( mellos@ceid.upatras.gr ) for any corrections or omissions. + +.TH PAM_SHELLS 8 "September 2008" "OpenPAM modules" "OpenPAM modules" +.SH NAME +pam_shells - PAM module to check for a valid login shell +.SH SYNOPSIS +.B pam_shells.so [\.\.\.] +.SH DESCRIPTION +pam_shells is a PAM module which examines each user's login shell and only allows access +if that shell is listed in +.I /etc/shells. +.PP +The module also checks the +.I /etc/shells +file to ensure that it's a regular file and +also that it's not world writable. If either of the above is true, the module returns +PAM_AUTH_ERR, which means that the +.I /etc/shells +file cannot be trusted (or either that the login shell of the user is not listed in the file). +.SH OPTIONS +No options are supported for this module. +.SH FILES +To enable the login shell check, add the following line to the appropriate +configuration file: +.IP +auth required pam_shells.so +.SH AUTHOR +Seraphim Mellos <mellos at ceid dot upatras dot gr> +.SH "SEE ALSO" +.BR shells(5), +.BR pam (8), +.BR pam.conf (8), +.BR pam.d (8) + diff --git a/modules/pam_shells/pam_shells.c b/modules/pam_shells/pam_shells.c index cce6824..9724f08 100644 --- a/modules/pam_shells/pam_shells.c +++ b/modules/pam_shells/pam_shells.c @@ -1,3 +1,28 @@ +/* + * Copyright (c) 2008 Seraphim Mellos <mellos@ceid.upatras.gr> + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> |