From: Paul Eggert Date: Thu, 19 Aug 2004 20:07:20 +0000 (+0000) Subject: Add support for "chown : file" and the like. X-Git-Tag: COREUTILS-5_3_0~768 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9308e71adabbc3347e549f95eef1604bcc0ad285;p=platform%2Fupstream%2Fcoreutils.git Add support for "chown : file" and the like. Also, fix a regression and some memory leaks. --- diff --git a/ChangeLog b/ChangeLog index c027655..6c3971f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2004-08-19 Paul Eggert + + * NEWS: "chown : file", "chown '' file", and "chgrp '' file" now + succeed without changing the uid and gid, like FreeBSD. + * src/chgrp.c (parse_group): Return gid_t rather than storing it + 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. + * src/chown-core.c (describe_change): Describe changes to -1:-1 + without using "to OWNERSHIP" phrase. + * src/chown.c (usage): "chown '' file" is now allowed. + (main): Do not set user name to the empty string if the group + name is null. + * tests/chgrp/basic: Test "chgrp '' file". + * tests/chown/Makefile.am (TESTS): Add separator. + * tests/chown/separator: New file, partly taken from + Dmitry V. Levin's suggestion in + + 2004-08-11 Paul Eggert * tests/install/basic-1: Test for the -d regression. diff --git a/doc/ChangeLog b/doc/ChangeLog index 48102bf..f36958a 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,13 @@ +2004-08-19 Paul Eggert + + * coreutils.texi (chown invocation): Fix synopsis: + group must always be preceded by separator. + "chown : file" and "chown '' file" don't change the owner or group. + Update the explanation of what happens to the set-user-ID or + set-group-ID bits, e.g., they sometimes are not cleared if they + denote mandatory locking. Change "find"-oriented examples to use + chown -h. + 2004-08-18 Paul Eggert * coreutils.texi (printf invocation): Clarify how "printf" is diff --git a/lib/ChangeLog b/lib/ChangeLog index 4742a86..97296b6 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,19 @@ +2004-08-18 Paul Eggert + + * userspec.c: Don't use , so that we don't use alloca on + strings on unbounded length. alloca's performance benefits aren't + that important here. + (V_STRDUP): Remove. + (parse_with_separator): New function, with most of the internals + of the old parse_user_spec. Allow user to omit both user and group, + for compatibility with FreeBSD. + Clone only the user name, not the entire spec. + Do not set *uid, *gid unless entirely successful. + Avoid memory leak in some failing cases. + Fix regression for USER.GROUP reported by Dmitry V. Levin in + + (parse_user_spec): Rewrite to use parse_with_separator. + 2004-08-11 Paul Eggert * fts.c (O_DIRECTORY): Define to 0 if the system doesn't define. @@ -67,7 +83,7 @@ Merge with gnulib and deal with some minor cleanups resulting. * .cppi-disable: Change fnmatch.h to fnmatch_.h. - * .cvs-ignore: Add fnmatch.h, poll.h, stdbool.h, sysexit.h. + * .cvsignore: Add fnmatch.h, poll.h, stdbool.h, sysexit.h. Remove safe-lstat.c, safe-lstat.h, safe-stat.c, safe-stat.h. * backupfile.h, closeout.h, full-write.h, mbswidth.h, xalloc.h: