lib/userspec.c


Log

Author Commit Date CI Message
Jim Meyering 4567197d 2003-11-03T15:03:24 Include "userspec.h".
Paul Eggert fa9635f2 2003-09-12T18:24:51 Remove K&R cruft.
Paul Eggert 992fc21f 2003-08-16T06:25:29 Accept `.' as a separator only in pre-POSIX-200112 mode.
Paul Eggert 552a680f 2003-05-29T07:21:59 in lib: * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h, rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H. * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c, xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed to do that. * fatal.c: Include <stdarg.h> without checking for __STDC__. * exclude.c: Include <stdbool.h> unconditionally. * tempname.c: Include <stddef.h> unconditionally. * hash.c: Include <limits.h>, since we no longer define CHAR_BIT. * modechange.c, rpmatch.c (NULL): Don't define, since <stddef.h> does that. * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed. * safe-read.c (INT_MAX): Don't define, since <limits.h> does that. * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed. * xstrtol.c: Likewise. * safe-read.c: Remove TYPE_SIGNED; no longer needed. * savedir.c: Include <stddef.h> instead of defining NULL. in m4: * backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h. * fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise. * human.m4 (gl_HUMAN): Likewise. * pathmax.m4 (gl_PATHMAX): Likewise. * rpmatch.m4 (gl_FUNC_RPMATCH): Likewise. * userspec.m4 (gl_USERSPEC): Likewise. * xreadlink.m4 (gl_XREADLINK): Likewise. * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise. * quote.m4 (gl_QUOTE): Don't check for stddef.h.
Bruno Haible 48dbf2c1 2003-01-10T21:06:49 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible f9fa25dc 2002-11-05T21:45:29 Include gettext.h instead of <libintl.h> with #ifdefs.
Jim Meyering e0e564bf 2002-01-16T22:38:04 add 2002 to Copyright line
Jim Meyering 62066676 2002-01-16T22:36:52 (ISDIGIT): Comment fix.
Jim Meyering cbcbda2a 2000-12-16T13:28:13 This bug had a serious impact on chown: `chown N:M FILE' (for integer N and M) would have treated it like `chown N:N FILE'. (parse_user_spec): Fix typo: s/u/g/.
Jim Meyering 20cc6a09 2000-12-16T13:01:24 tweak a comment
Jim Meyering a0611e0e 2000-09-21T05:40:28 (parse_user_spec): Remove debugging printf I'd added. Argh!
Jim Meyering 2bcfb3c5 2000-09-09T07:20:46 Don't use atoi. Include sys/param.h and limits.h. Include xstrtol.h. (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define. (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define. (parse_user_spec): Use xstrtoul, not atoi when converting numeric UID, GID. Check range.
Jim Meyering d0017fe1 2000-08-07T16:56:29 (same_name): Invoke xalloc_die instead of printing our own message. (parse_user_spec): Don't translate a message until just before returning, to avoid unnecessary translation.
Jim Meyering d1834f9b 2000-02-27T11:13:16 (parse_user_spec): If there is no `:' but there is a `.', then first look up the entire `.'-containing string as a login name.
Jim Meyering 63be8072 2000-02-12T10:41:37 <libintl.h>: Include. (_ and N_): Define. (parse_user_spec): Mark translatable strings.
Jim Meyering 2cbc4063 2000-02-12T10:11:54 add FIXME comments for use of atoi
Jim Meyering e7fedf4d 2000-02-12T10:10:40 (ISDIGIT): Define it. (isdigit): Remove definition. (is_number): Use ISDIGIT, not isdigit.
Jim Meyering 81f0aa5b 1998-12-19T17:20:03 break long line
Jim Meyering 74b5dbe6 1998-12-19T17:19:13 break long line
Jim Meyering cf42d3e5 1998-12-07T03:12:10 ansideclify
Jim Meyering 428e9107 1998-05-10T16:04:39 Don't declare strdup if it's defined as a macro. Reported by Lorne Baker.
Jim Meyering 67f394c1 1998-03-15T11:09:10 Use #if, not #ifdef with HAVE_ macros
Jim Meyering 6b8b6dee 1998-03-10T22:49:04 (parse_user_spec) [__DJGPP__]: Make function know about any arbitrary user and group by pretending to be the user and to belong to the group specified in `spec_arg' argument.
Jim Meyering 8e7d2081 1997-07-06T11:57:38 Change some #ifdef to #if. Indent a cpp directive.
Jim Meyering 6d8337bf 1996-07-15T03:36:16 update FSF address in copyright
Jim Meyering a70069a6 1995-10-18T15:59:12 [HAVE_ENDGRENT]: Define away endgrent. [HAVE_ENDPWENT]: Define away endpwent.
Jim Meyering 83abb4a7 1995-08-05T03:13:16 (isnumber): Rename to is_number. (parse_user_spec): Rename uses, too.
Jim Meyering cfb5e51f 1995-05-13T13:25:42 (parse_user_spec): Use strchr, not index. [!HAVE_STRING_H]: Define strchr in terms of index, not the other way around.
Jim Meyering 300424a2 1994-10-02T05:43:03 merge with 3.9h
Jim Meyering a30cab0e 1994-07-01T15:23:47 (main): Change #ifdef TESTING to TEST.
Jim Meyering 19db5b2f 1994-07-01T14:04:23 Include alloca directives. Replace 3 lines with V_STRDUP equivalent.
Jim Meyering 26a0ec5b 1994-07-01T13:58:06 Rewrite.
Jim Meyering 5a84bc45 1994-03-14T18:47:31 .
Jim Meyering 693dd1da 1994-03-14T18:41:13 .
Jim Meyering 9d3b49b8 1993-10-26T23:39:04 merge with 3.9a
Jim Meyering a89ae060 1993-10-12T20:24:09 merge with 3.8.4c
Jim Meyering 92a0e357 1993-10-06T16:44:42 merge with 3.8.3b
Jim Meyering 43832d5a 1993-04-05T00:53:40 * system.h [rindex, incl, bcopy, bzero]: Ditto. * userspec.c [index]: Ditto.
Jim Meyering d87c3946 1992-10-31T20:42:48 Initial revision