diff options
author | obrien <obrien@FreeBSD.org> | 1999-07-28 04:26:10 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-07-28 04:26:10 +0000 |
commit | 4bcf1a9e396b6d2e39d5dddd1d07ae0104160327 (patch) | |
tree | c4a19ce055e2471f997dc80a933499f4138a670d | |
parent | 5245387bb34fc563bc9be681fc8d82661b5fa0ce (diff) | |
download | FreeBSD-src-4bcf1a9e396b6d2e39d5dddd1d07ae0104160327.zip FreeBSD-src-4bcf1a9e396b6d2e39d5dddd1d07ae0104160327.tar.gz |
Go back to allowing ``.'' as a username.group separator for backward
compatibility. : is still the documented non-ambiguous approach. The
algorithm used will correctly parse david.obrien.staff as strrchar() is
used, and in my mind more people would use a ``.'' in the username than
the group name.
Convinced by argument and patch by: sheldonh (with slight changes by me)
-rw-r--r-- | usr.sbin/newsyslog/newsyslog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 40dfdd9..d0c65d5 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -27,7 +27,7 @@ provided "as is" without express or implied warranty. #ifndef lint static const char rcsid[] = - "$Id: newsyslog.c,v 1.22 1999/01/22 19:38:39 wollman Exp $"; + "$Id: newsyslog.c,v 1.23 1999/06/28 03:15:02 obrien Exp $"; #endif /* not lint */ #define OSF @@ -286,7 +286,8 @@ static struct conf_entry *parse_file() if (!*parse) errx(1, "malformed line (missing fields):\n%s", errline); *parse = '\0'; - if ((group = strchr(q, ':')) != NULL) { + if ((group = strchr(q, ':')) != NULL || + (group = strrchr(q, '.')) != NULL) { *group++ = '\0'; if (*q) { if (!(isnumber(*q))) { |