summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--doc/modules/pam_access.sgml10
-rw-r--r--modules/pam_access/pam_access.c7
3 files changed, 18 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 352556d2..bd193b76 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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");