summaryrefslogtreecommitdiff
path: root/modules/pam_access/pam_access.c
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2005-05-27 10:33:14 +0000
committerTomas Mraz <tm@t8m.info>2005-05-27 10:33:14 +0000
commit346893dbef4b4697e3efbffd05d9de94d93263c3 (patch)
tree6e5e168c41b819c174c314d4e1f50e8135403bd3 /modules/pam_access/pam_access.c
parent3d1d89d1397237bb80d612096c7cacf2943fae70 (diff)
Relevant BUGIDs:
Purpose of commit: new feature Commit summary: --------------- * pam_access: Add listsep option to set list element separator by Richard Shaffer
Diffstat (limited to 'modules/pam_access/pam_access.c')
-rw-r--r--modules/pam_access/pam_access.c7
1 files changed, 6 insertions, 1 deletions
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");