summaryrefslogtreecommitdiff
path: root/src/id.c
AgeCommit message (Collapse)Author
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-07-06setuidgid: set all groups, not just the primary one; mgetgroups: new moduleJim Meyering
I wanted to use the xgetgroups function from id.c, so factored it out and made it into a non-exiting function (hence the "m" prefix rather than "x"). * src/setuidgid.c (main): Use mgetgroups. Include "mgetgroups.h". * src/id.c (xgetgroups): Remove function. Include "mgetgroups.h". (print_group_list): Use mgetgroups, not xgetgroups. * gl/modules/mgetgroups: New module. * gl/lib/mgetgroups.c: New file. mgetgroups is derived from id.c's xgetgroups function. * bootstrap.conf (gnulib_modules): Add mgetgroups. * gl/m4/mgetgroups.m4: New file. * gl/lib/mgetgroups.h: New file.
2007-07-05* src/id.c: Include "getugroups.h" rather than declaring manually.Jim Meyering
2007-03-29* src/id.c (main): Tweak id -Z diagnostic.Jim Meyering
2007-03-29id: Add SELinux support: -Z option.Jim Meyering
* src/id.c (main): Apply patches from Fedora, with these changes: Remove #ifdef WITH_SELINUX. Use error (EXIT_FAILURE, not fprintf+exit(1). * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2005-07-08(print_user): Don't assume uid fits in unsigned int.Paul Eggert
(print_group): Likewise, for gid.
2005-05-30(getpwuid, getgrgid, getuid, getgid, geteuid, getegid)Paul Eggert
[!defined _POSIX_VERSION]: Remove decls.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-03-06Remove register keyword.Jim Meyering
2004-09-22remove trailing blankJim Meyering
2004-09-21Remove unused "case 0".Paul Eggert
2004-09-13(print_full_info): Don't exit with failure status simplyPaul Eggert
because a user or group number can't be turned into a name.
2004-08-03(use_name, main, print_user, xgetgroups, print_group_list,Paul Eggert
print_full_info): Use bool for booleans. (problems): Remove, replacing with.... (ok): New var (inverted from old sense). (print_user, print_group, print_full_info): Print uids/gids with %lu, not %u. (xgetgroups): Don't run out of memory if getgroups or getugroups returns -1.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-05-06(xgetgroups): Use variable name, rather than type name in computing bufferJim Meyering
size for xnmalloc.
2004-05-06(xgetgroups): Use xnmalloc, rather than xmalloc.Jim Meyering
Don't add `1' to the buffer size (it was to protect against malloc implementations that fail to allocate a buffer of size zero). That is no longer necessary, since we use a malloc wrapper on such systems.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(usage): Don't bother normalizing exit status since the arg is already the correct exit status now. (main): Don't assume EXIT_FAILURE == 1, as POSIX doesn't require it. (problems): Now a boolean int, not a counter, so that we don't have to worry about int overflow. All uses changed.
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-09-18revert previous changeJim Meyering
2003-09-18Update AUTHORS definition to be a comma-separated list of strings and/or updateJim Meyering
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-03-27Remove Arnold Robbins' obsolete e-mail addressJim Meyering
from `written by...' comment, at his request.
2002-12-15Remove all uses of `PARAMS'.Jim Meyering
2002-09-14(print_full_info, print_group_list): Add casts to avoidJim Meyering
warnings about `signed and unsigned type in conditional expression'.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2001-12-15Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions. Split --help output into smaller pieces. Use fputs, not printf.
2001-08-14(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2000-12-02Move dcls of globals used only in main...Jim Meyering
(main): ...to here. (usage): Clarify option descriptions.
2000-06-26`id -Gn' (invoked by groups) would fail without giving a diagnosticJim Meyering
on malconfigured systems. (print_user): Give a diagnostic if number->name lookup fails. (print_group): Likewise.
2000-05-07Include "closeout.h".Jim Meyering
(main): Call atexit with close_stdout.
1999-03-31No longer include long-options.h.Jim Meyering
[long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-31(PROGRAM_NAME, AUTHORS): Define and use.Jim Meyering
1999-03-27(print_user): Use uid_t instead of int.Jim Meyering
(print_group): Use gid_t instead of int.
1999-03-10*** empty log message ***Jim Meyering
1999-03-09(xgetgroups): Take new parameter, gid, and pass it to getugroups.Jim Meyering
(print_group_list): Call getpwuid and adjust calls to xgetgroups to include new parameter.
1999-03-06Include long-options.h.Jim Meyering
[long_options]: Remove the "help" and "version" entries. Remove declarations of show_help and show_version. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-01-25(usage): Remove static attribute.Jim Meyering
Move function be the first in the file.
1998-09-19update bug-reporting addressJim Meyering
1998-06-29revert back to using lower case _unlocked wrapper namesJim Meyering
1998-06-29Change all uses of unlocked-wrapped functions to their upper case wrapper names.Jim Meyering
1998-02-03add comments on #endif'sJim Meyering
1998-02-03(xgetgroups): Guard function defn with #if HAVE_GETGROUPS.Jim Meyering