diff options
author | Tomas Mraz <tm@t8m.info> | 2005-05-27 10:33:14 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2005-05-27 10:33:14 +0000 |
commit | 346893dbef4b4697e3efbffd05d9de94d93263c3 (patch) | |
tree | 6e5e168c41b819c174c314d4e1f50e8135403bd3 | |
parent | 3d1d89d1397237bb80d612096c7cacf2943fae70 (diff) | |
download | pam-346893dbef4b4697e3efbffd05d9de94d93263c3.tar.gz pam-346893dbef4b4697e3efbffd05d9de94d93263c3.tar.bz2 pam-346893dbef4b4697e3efbffd05d9de94d93263c3.zip |
Relevant BUGIDs:
Purpose of commit: new feature
Commit summary:
---------------
* pam_access: Add listsep option to set list element separator by
Richard Shaffer
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | doc/modules/pam_access.sgml | 10 | ||||
-rw-r--r-- | modules/pam_access/pam_access.c | 7 |
3 files changed, 18 insertions, 1 deletions
@@ -81,6 +81,8 @@ BerliOS Bugs are marked with (BerliOS #XXXX). for rlimit value (Bug 945449 - kukuk, t8m) * pam_xauth: Unset the XAUTHORITY variable when requesting user is root and target user is not (t8m) +* pam_access: Add listsep option to set list element separator by + Richard Shaffer (t8m) 0.79: Thu Mar 31 16:48:45 CEST 2005 * pam_tally: added audit option (toady) diff --git a/doc/modules/pam_access.sgml b/doc/modules/pam_access.sgml index 8a910d13..52f10342 100644 --- a/doc/modules/pam_access.sgml +++ b/doc/modules/pam_access.sgml @@ -59,6 +59,7 @@ Provides logdaemon style login access control. <tt>accessfile=<it>/path/to/file.conf</it></tt>; <tt>fieldsep=<it>separators</it></tt> +<tt>listsep=<it>separators</it></tt> <tag><bf>Description:</bf></tag> @@ -89,6 +90,15 @@ wants to use pam_access with X based applications, since the <tt/PAM_TTY/ item is likely to be of the form "hostname:0" which includes a `:' character in its value. +<item><tt>listsep=<it>separators</it></tt> - +this option modifies the list separator character that +<tt/pam_access/ will recognize when parsing the access configuration +file. For example: <tt>listsep=,</tt> will cause the default ` ' and `\t' +characters to be treated as part of a list element value and `,' becomes the +only list element separator. Doing this is useful on a system with +group information obtained from a Windows domain, where the default built-in +groups "Domain Users", "Domain Admins" contain a space. + </itemize> <tag><bf>Examples/suggested usage:</bf></tag> diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index 4f6cf574..797e7160 100644 --- a/modules/pam_access/pam_access.c +++ b/modules/pam_access/pam_access.c @@ -86,7 +86,7 @@ /* Delimiters for fields and for lists of users, ttys or hosts. */ static const char *fs = ":"; /* field separator */ -static const char sep[] = ", \t"; /* list-element separator */ +static const char *sep = ", \t"; /* list-element separator */ /* Constants to be used in assignments only, not in comparisons... */ @@ -129,6 +129,11 @@ static int parse_args(struct login_info *loginfo, int argc, const char **argv) /* the admin wants to override the default field separators */ fs = argv[i]+9; + } else if (!strncmp("listsep=", argv[i], 8)) { + + /* the admin wants to override the default list separators */ + sep = argv[i]+8; + } else if (!strncmp("accessfile=", argv[i], 11)) { FILE *fp = fopen(11 + argv[i], "r"); |