summaryrefslogtreecommitdiff
path: root/src/chown-core.c
AgeCommit message (Collapse)Author
2004-05-17(chopt_init): Affect each symlink referent by default.Jim Meyering
2004-05-16chown --dereference did nothing when the owner/group of aJim Meyering
symlink matched the desired owner/group. Reported by David Malone. Also reported in 1999 as http://bugs.debian.org/39642. (change_file_owner): When --dereference has been specified, and when processing a symlink, stat it to get the owner and group of the referent.
2004-05-01When chown or chgrp is modifying the referent of a symlink,Jim Meyering
use the chown(2) function, if possible. (change_file_owner): Don't hard-code the open/fchown/close kludge here. Use `chown' instead. The chown function works just fine on conforming systems. Other systems now go through the new chown wrapper that resorts to the old kludge.
2004-05-01(change_file_owner): Add a comment.Jim Meyering
2004-04-27(chopt_init, chopt_free, gid_to_name, uid_to_name, chown_files):Jim Meyering
Add `extern' keyword.
2004-03-27Don't include savedir.h -- no longer needed.Jim Meyering
2003-11-09Include "root-dev-ino.h".Jim Meyering
(chopt_init): Initialize new member. (change_file_owner): Support rm's new --preserve-root option.
2003-10-17(change_file_owner): Handle the cases inJim Meyering
which fts_info indicates an error with the given entry.
2003-10-17Include "xfts.h".Jim Meyering
(chown_files): Use xfts_open, rather than fts_open.
2003-10-17tweak commentJim Meyering
2003-10-15Rewrite to iterate through hierarchies using fts rather thanJim Meyering
via explicit recursion. Include "fts_.h" (change_file_owner): Rewrite to use FTS* and FTSENT* and to operate on a single file at a time. (chown_files): New function.
2003-10-05(change_file_owner): Remove set-but-not-used local.Jim Meyering
2003-07-12(change_file_owner): Do not restore any specialJim Meyering
permission bits (e.g., set-user-ID, set-group-ID) that are reset by chown(2) on some systems. Suggestion and insistence :-) from Michael Stone.
2003-07-10(change_file_owner): Don't leak file descriptors when dereferencing symlinks.Jim Meyering
2002-01-21Don't include "xalloc.h", as system.h already does that via sys2.h.Jim Meyering
2001-12-11(change_file_owner):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-08-31(change_dir_owner): Remove statp arg; no longer needed.Jim Meyering
2000-12-16(uint_to_string): New function.Jim Meyering
(uid_to_name): Use it. (gid_to_name): Use it. Rename locals, user/group, to uid/gid.
2000-12-15Declare lstat.Jim Meyering
Rename change_symlinks member to `dereference' and use the DEREF_* enum values. (describe_change): Merge the chgrp and chown switch statements. Use xmalloc to form the `user:group' string. (change_file_owner): Record (and later, use) is_symlink and is_directory from the lstat stats, in order to control whether we operate on symlinks and whether (with -R) we traverse symlinks to directories. When dereferencing, use open/fchown (rather than chown) on symlinks.
2000-12-10give a better diagnostic when only the group is being changedJim Meyering
2000-12-09(chopt_free): don't free anythingJim Meyering
2000-12-09Include <pwd.h>, <grp.h>, and "xalloc.h".Jim Meyering
[!_POSIX_VERSION]: Declare getgrnam and getgrgid. (gid_to_name): New function. (uid_to_name): Likewise. (chopt_free): Likewise.
2000-12-09*** empty log message ***Jim Meyering