summaryrefslogtreecommitdiff
path: root/src/chgrp.c
AgeCommit message (Collapse)Author
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-19(parse_group): Return gid_t rather than storing itPaul Eggert
through a pointer. Treat "chgrp '' file" as a no-op change, as FreeBSD does. (main): Set chopt.group_name to NULL if the group is the empty string.
2004-07-28(parse_group): Require base 10 when parsing groups as integers.Paul Eggert
(main): int -> bool when appropriate.
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-06-08(main): Check for incompatible options. -R --dereferenceJim Meyering
requires either -H or -L, and -R -h requires -P. If -H, specify FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster. Make this file as much like chown.c as possible.
2004-05-17chgrp and chown now dereference symlinks by default, per POSIX.Jim Meyering
(usage): Update to reflect this.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
2003-11-09(usage): Describe new options.Jim Meyering
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-10-16(main): Simply assign to bit_flags.Jim Meyering
Don't bother with bit arithmetic.
2003-10-15Include "fts_.h".Jim Meyering
(WRITTEN_BY): Add my name. (MAXUID, MAXGID): Remove definitions. Use GID_T_MAX instead of the latter. (usage): Update. (main): Handle new options. Call new function, chown_files rather than change_file_owner.
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-06-17(main): Call initialize_main.Jim Meyering
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-11(main):Jim Meyering
Include the word `fail' in some diagnostics to make it clearer that they indicate a failure. s/getting attributes/failed to get attributes/
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23Split usage strings so that --help and --versionJim Meyering
descriptions are alone in their own string.
2001-11-23(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-08-31Do not include savedir.h; not used.Jim Meyering
2001-01-07(parse_group): Normalize spelling.Jim Meyering
2000-12-16(main): Rename local, group, to gid.Jim Meyering
2000-12-15(main): Reflect renaming: s/dereference/change_symlinks/.Jim Meyering
2000-12-09Include "chown-core.h".Jim Meyering
[enum Change_status, enum Verbosity]: Remove declarations. Remove decls of globals that are now part of struct Chown_option. Remove decl of xstat. (describe_change): Remove function. (change_file_group): Likewise. (change_dir_group): Likewise. (parse_group): Don't set global, groupname, here... (main): ... instead, initialize `chopt.group_name' here. Initialize chopt and update uses of the now-members. Set group_name also when it's obtained via a --reference=FILE option. Call change_file_owner (with -1 for uids), not change_file_group.
2000-07-30Convert "`%s'" in format strings to "%s", and wrap eachJim Meyering
corresponding argument in a `quote (...)' call. Add more precise diagnostics.
2000-07-25(change_file_group): Save errno from a possibly failed chown,Jim Meyering
and use that later. Otherwise, errno itself could be clobbered before used.
2000-06-27(change_dir_group): Don't set errno beforeJim Meyering
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
1999-11-20Declare lstat; needed on e.g. SunOS4.Jim Meyering
Reported by Tom Tromey.
1999-11-07(xstat): New global.Jim Meyering
(main): Define it. (change_file_group): Use it. Before this change, when running chgrp on a symlink without --dereference (-h) and when the requested group is the same as the group for the *symlink*, chgrp would do nothing. Now it changes the group of the file referenced through the symlink. Reported by Martin Mitchell.
1999-11-07Define and use REFERENCE_FILE_OPTION andJim Meyering
DEREFERENCE_OPTION in place of bare `CHAR_MAX + N'.
1999-08-20(usage): Tweak --help output to make it more consistent with that of chown.Jim Meyering
1999-08-16This change is nearly identical to the chown.c change of 1998-05-24Jim Meyering
Accept new option, --dereference. --no-dereference is now the default. Include lchown.h. (enum Change_status) [CH_NOT_APPLIED]: New member. (change_symlinks): Enable this by default, now. (describe_change): Handle new case. (change_file_group): Add new parameter: cmdline_arg. Update callers. Reorganize to reflect changed semantics. (LCHOWN): Remove definitions. From Bruno Haible.
1999-08-08(change_dir_group): Remove cast of savedir arg.Jim Meyering
1999-04-18Include xstrtol.h, not obsolete file xstrtoul.h.Jim Meyering
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.
1999-03-26define and use AUTHORSJim Meyering
1999-03-26No longer include long-options.h.Jim Meyering
Include version-etc.h instead. (PROGRAM_NAME): Define. [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-22*** empty log message ***Jim Meyering
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-02-16update copyright datesJim Meyering
1999-01-16(usage): Don't make it static so that it can be called from libfu.a by ↵Jim Meyering
xargmatch.
1998-12-18(MAXGID): Define.Jim Meyering
Use gid_t (not int) as the type for `group' variables. (parse_group): Use MAXGID, not INT_MAX.
1998-09-19update bug-reporting addressJim Meyering
1998-08-30(long_options): Replace 12 with CHAR_MAX + 1.Jim Meyering
1998-03-15Use #if, not #ifdef with HAVE_ macros.Jim Meyering
Use #if !, not #ifndef with HAVE_ macros.
1998-01-04Use a single enumerated type, Verbosity, instead ofJim Meyering
the two booleans, verbose and changes_only. This fixes a bug whereby --change had the same effect as --verbose.
1997-12-28Remove incorrect declaration of group_member.Jim Meyering
Include group-member.h instead. Based on suggestion from Ulrich Drepper.
1997-12-16s/__P/PARAMS/gJim Meyering