Accept `.' as a separator only in pre-POSIX-200112 mode.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Aug 2003 06:25:29 +0000 (06:25 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Aug 2003 06:25:29 +0000 (06:25 +0000)
lib/userspec.c
modules/userspec

index 80ace3e237181b34fb7b70a10954d599bc5e718d..19443ec912da8c0248cf98d2bd951e3d20ef33ed 100644 (file)
@@ -51,6 +51,7 @@
 # include <unistd.h>
 #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
index 388f6465be4aca658e8ff1c04dd88db5db046bad..4ad374618c721876f22cf9a99a3ac3feb2f3e3e2 100644 (file)
@@ -8,6 +8,7 @@ m4/userspec.m4
 
 Depends-on:
 alloca
+posixver
 xalloc
 xstrtol
 strdup