Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Ondřej Vašík
Jim Meyering wrote: Ondřej Vašík [EMAIL PROTECTED] wrote: as reported in https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/187315 by Aaron Toponce , chmod could display confusing messages when used for SGID/SUID/sticky bits without permissions to change them. e.g. with non-root

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Jim Meyering
Ondřej Vašík [EMAIL PROTECTED] wrote: Jim Meyering wrote: Ondřej Vašík [EMAIL PROTECTED] wrote: as reported in https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/187315 by Aaron Toponce , chmod could display confusing messages when used for SGID/SUID/sticky bits without permissions

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Ondřej Vašík
Jim Meyering wrote: Ondřej Vašík [EMAIL PROTECTED] wrote: Throwing out --changes should be ok, if user wants to be informed, he can parse verbose output easily and common case is to use it without verbose mode at all. Anyway --verbose output is affected by this issue as well, so I would

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ondřej Vašík on 11/20/2008 5:51 AM: For me verbose mode is something useful to track problems. Therefore I do prefer more informations there. Common usage of chown/chmod/chgrp/chcon utilities is without --verbose/--changes mode, so it

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote: According to Ondřej Vašík on 11/20/2008 5:51 AM: For me verbose mode is something useful to track problems. Therefore I do prefer more informations there. Common usage of chown/chmod/chgrp/chcon utilities is without --verbose/--changes mode, so it would

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Andreas Schwab
Eric Blake [EMAIL PROTECTED] writes: Would a double --verbose make sense? --verbose=2 Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-20 Thread Ondřej Vašík
Andreas Schwab wrote: Eric Blake [EMAIL PROTECTED] writes: Would a double --verbose make sense? --verbose=2 Rather than some level-numbers I do prefer --verbose and --verbose=high ... Ondřej signature.asc Description: Toto je digitálně podepsaná část zprávy

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-11-12 Thread Jim Meyering
Ondřej Vašík [EMAIL PROTECTED] wrote: as reported in https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/187315 by Aaron Toponce , chmod could display confusing messages when used for SGID/SUID/sticky bits without permissions to change them. e.g. with non-root sudoers user following

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-10-25 Thread Ondřej Vašík
Hello, thanks for review and objections. Paul Eggert wrote: Ondřej Vašík [EMAIL PROTECTED] writes: - bool changed = (chmod_succeeded - mode_changed (file, old_mode, new_mode)); + bool mode_change = mode_changed (file, old_mode, new_mode); + bool changed

[PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-10-24 Thread Ondřej Vašík
Hello, as reported in https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/187315 by Aaron Toponce , chmod could display confusing messages when used for SGID/SUID/sticky bits without permissions to change them. e.g. with non-root sudoers user following scenario mkdir tmp;sudo chown .root

Re: [PATCH]: chmod - do inform about using different mode than requested with SGID/SUID/sticky bits without permissions to change them

2008-10-24 Thread Paul Eggert
Ondřej Vašík [EMAIL PROTECTED] writes: - bool changed = (chmod_succeeded -mode_changed (file, old_mode, new_mode)); + bool mode_change = mode_changed (file, old_mode, new_mode); + bool changed = (chmod_succeeded mode change); + + if (chmod_succeeded