]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorTomas Mraz <tm@t8m.info>
Fri, 27 May 2005 10:33:14 +0000 (10:33 +0000)
committerTomas Mraz <tm@t8m.info>
Fri, 27 May 2005 10:33:14 +0000 (10:33 +0000)
Purpose of commit: new feature

Commit summary:
---------------
* pam_access: Add listsep option to set list element separator by
  Richard Shaffer

CHANGELOG
doc/modules/pam_access.sgml
modules/pam_access/pam_access.c

index 352556d22fbe75de9c30685995bc5fcbe1dff5b2..bd193b76ac088a836f2377cc5196d043c4a5ca59 100644 (file)
--- 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)
index 8a910d1340375a688c20406cbf0faaae3ddd3353..52f103428d7f98ffde97f65f99177a182bb34228 100644 (file)
@@ -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>
index 4f6cf574fbc1671eb31923d5c766321e6da8e467..797e7160d9d9fee30ffe12020bd31444f2ca16c4 100644 (file)
@@ -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");