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)
This commit is contained in:
parent
804c097b9e
commit
ae2c5cf197
@ -27,7 +27,7 @@ provided "as is" without express or implied warranty.
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#define OSF
|
#define OSF
|
||||||
@ -286,7 +286,8 @@ static struct conf_entry *parse_file()
|
|||||||
if (!*parse)
|
if (!*parse)
|
||||||
errx(1, "malformed line (missing fields):\n%s", errline);
|
errx(1, "malformed line (missing fields):\n%s", errline);
|
||||||
*parse = '\0';
|
*parse = '\0';
|
||||||
if ((group = strchr(q, ':')) != NULL) {
|
if ((group = strchr(q, ':')) != NULL ||
|
||||||
|
(group = strrchr(q, '.')) != NULL) {
|
||||||
*group++ = '\0';
|
*group++ = '\0';
|
||||||
if (*q) {
|
if (*q) {
|
||||||
if (!(isnumber(*q))) {
|
if (!(isnumber(*q))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user