From 992fc21fb8cf509e83189873d80286cc502e7c8a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 16 Aug 2003 06:25:29 +0000 Subject: [PATCH] Accept `.' as a separator only in pre-POSIX-200112 mode. --- lib/userspec.c | 3 ++- modules/userspec | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/userspec.c b/lib/userspec.c index 80ace3e237..19443ec912 100644 --- a/lib/userspec.c +++ b/lib/userspec.c @@ -51,6 +51,7 @@ # include #endif +#include "posixver.h" #include "xalloc.h" #include "xstrtol.h" @@ -179,7 +180,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid, separator = strchr (spec, ':'); /* If there is no colon, then see if there's a `.'. */ - if (separator == NULL) + if (separator == NULL && posix2_version () < 200112) { dot = strchr (spec, '.'); /* If there's no colon but there is a `.', then first look up the diff --git a/modules/userspec b/modules/userspec index 388f6465be..4ad374618c 100644 --- a/modules/userspec +++ b/modules/userspec @@ -8,6 +8,7 @@ m4/userspec.m4 Depends-on: alloca +posixver xalloc xstrtol strdup -- 2.30.2