summaryrefslogtreecommitdiff
path: root/src/chown.c
AgeCommit message (Collapse)Author
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(main): Removed unused local 'fail'.
2003-11-09Support new options: --preserve-root and --no-preserve-root.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. Rename a couple of local variables. Remove unnecessary casts.
2003-10-15chown now accepts POSIX-mandated -H, -L, -P options and usesJim Meyering
fts to perform a directory traversal when -R is specified. Before, it used explicit recursion, and as such was limited by the user's stack size to handling hierarchies no deeper than about 30,000 levels. Include "userspec.h" and "fts_.h". (WRITTEN_BY): Add my name. (getpwnam, getgrnam, getgrgid): Remove declarations. (endpwent): Remove definition. (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
2003-04-11Remove SPC in SPC-TAB sequence.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-09-15(main): Don't strip trailing slashes; POSIX doesn't allow it here.Jim Meyering
Don't include "dirname.h" when no longer needed.
2001-08-31Do not include savedir.h; not used.Jim Meyering
2001-05-12(strip_trailing_slashes): Remove declaration; now in dirname.h.Jim Meyering
2001-05-10(main): Fix thinko: s/argv[optind]/optarg/.Jim Meyering
2001-02-17(main): `quote' the offending argument.Jim Meyering
2001-01-07(usage): Split long message string.Jim Meyering
2000-12-16(main): Rename locals, user/group, to uid/gid.Jim Meyering
2000-12-15(main): Reflect renaming: s/dereference/change_symlinks/.Jim Meyering
2000-12-09Don't include pwd.h or grp.h -- no longer needed.Jim Meyering
Include chown-core.h. [enum Change_status, enum Verbosity]: Remove declarations. Remove decls of globals that are now part of struct Chown_option. (describe_change): Remove function. (change_file_owner): Likewise. (change_dir_owner): Likewise. (main): Initialize chopt and update uses of the now-members. Set user_name and group_name also when they're obtained via a --reference=FILE option. Pass `chopt' to change_file_owner.
2000-12-09(change_file_owner): Restore special file permissionJim Meyering
bits, since calling chown resets them on some systems. Reported by Matt Perry.
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_owner): 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_owner): 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
2000-04-17Accept new option: --from=CURRENT_OWNER:CURRENT_GROUP.Jim Meyering
(enum) [FROM_OPTION]: New member. (long_options): New getopt spec. (change_file_owner): Add old_user, old_group parameters. Use them. (change_dir_owner): Likewise. (usage): Describe. (main): New case.
2000-02-12(usage): Mention only `:', and not `.' as the separator.Jim Meyering
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 chgrp.Jim Meyering
1999-08-16(groupname): Declare to be `const'.Jim Meyering
(change_dir_owner): Declare statp parameter to be `const'. (usage): Make the output be more consistent with that from chgrp.
1999-08-08(change_dir_owner): Remove cast of savedir arg.Jim Meyering
1999-04-01(main): Move the declaration of `e' into the scopeJim Meyering
where it's used and make it `const'.
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-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-09-19update bug-reporting addressJim Meyering
1998-08-30Replace 12 and 13 with CHAR_MAX + 1 and CHAR_MAX + 2 respectively.Jim Meyering
1998-07-16Include lchown.h.Jim Meyering
1998-07-16[!ENOSYS] (ENOSYS): Define to ENOTSUP or ENOMSG.Jim Meyering
1998-05-24tweak --changed diagnosticJim Meyering
1998-05-24tweak commentJim Meyering
1998-05-24Accept new option, --dereference. --no-dereference is now the default.Jim Meyering
(Change_status) [CH_NOT_APPLIED]: New member. (change_symlinks): Enable this by default, now. (describe_change): Handle new case. (change_file_owner): Add new parameter: cmdline_arg. Update callers. Reorganize to reflect changed semantics. (LCHOWN): Remove definitions.
1998-03-15Use #if, not #ifdef with HAVE_ macros.Jim Meyering
Use #if !, not #ifndef with HAVE_ macros.