[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#249177: coreutils: chown is not POSIXLY_CORRECT even when the va
From: |
Jim Meyering |
Subject: |
Re: Bug#249177: coreutils: chown is not POSIXLY_CORRECT even when the variable is set |
Date: |
Sat, 12 Jun 2004 11:22:18 +0200 |
Paul Eggert <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>
>> Shouldn't we should either deprecate and undocument that option or
>> make it work once again?
>
> Either is fine with me. Here's a proposed patch to make it work. I
> noticed some other bugs in this area (also in chmod) and this patch
> fixes them too.
>
> 2004-06-08 Paul Eggert <address@hidden>
>
> Adjust chmod and chown to be similar if -c or -v are given. In
> particular, a no-op chown is no longer reported as a change; this
> reverts to previous behavior. Also, fix both commands so that -v
> report failures even if the failure is not due to the chmod or
> chown syscalls.
>
> * src/chmod.c (CH_NOT_APPLIED): New constant.
> (describe_change): Handle it.
> (process_file): Use it, if a symlink wasn't changed.
> (mode_changed): Return bool, not int. Accept new argument
> NEW_MODE; all callers changed. This lets us avoid statting the
> file unless the new mode has unusual bits.
> (process_file): Return -1 on error. With -v, report all errors
> verbosely, not just some.
>
> * src/chown-core.c (change_file_owner): Return -1 on error, not
> 1 sometimes and -1 on others. Our caller ORs together our results,
> and (-1 | 1) == 0 on ones-complement hosts.
> With -v report all errors verbosely, not just some.
> Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent:
> file_stats wasn't set properly in that case.
>
> * tests/chgrp/basic: Adjust to above changes.
Thanks, again. I've applied this one, too.