(GalaxyMaster | 22 Jan 09:44 2009

chmod isn't validating its output?

Dmitry,

I'm just curious whether we need to fix this or not in our coreutils
package.  The following example demonstrates the issue.  It's not a
bug, but is something we might want to fix and to submit upstream.

mother!galaxy:~$ ls -l sample.file
-rw------- 1 galaxy galaxy 0 2009-01-22 11:34 sample.file
mother!galaxy:~$ chmod g+o sample.file
mother!galaxy:~$ echo $?
0
mother!galaxy:~$ ls -l sample.file
-rw------- 1 galaxy galaxy 0 2009-01-22 11:34 sample.file
mother!galaxy:~$ rpm -qf `which chmod`
coreutils-5.93-owl2
mother!galaxy:~$

Note that I supplied chmod with weird permission symbol and it didn't
complain and hasn't returned any failure code.

Since we have one of the coreutils maintainers in out team :) I thought
it would be appropriate to ask here whether I should submit the bug
report to the coreutils developers or is this "feature" here on a
purpose?  If it's the latter I would like to know why (just to learn
some history behind it :) )

-- 
(GM)

--

-- 
(Continue reading)

Dmitry V. Levin | 22 Jan 11:13 2009

Re: chmod isn't validating its output?

Hi,

On Thu, Jan 22, 2009 at 11:44:07AM +0300, (GalaxyMaster) wrote:
> Dmitry,
> 
> I'm just curious whether we need to fix this or not in our coreutils
> package.  The following example demonstrates the issue.  It's not a
> bug, but is something we might want to fix and to submit upstream.
> 
> mother!galaxy:~$ ls -l sample.file
> -rw------- 1 galaxy galaxy 0 2009-01-22 11:34 sample.file
> mother!galaxy:~$ chmod g+o sample.file
> mother!galaxy:~$ echo $?
> 0
> mother!galaxy:~$ ls -l sample.file
> -rw------- 1 galaxy galaxy 0 2009-01-22 11:34 sample.file
> mother!galaxy:~$ rpm -qf `which chmod`
> coreutils-5.93-owl2
> mother!galaxy:~$
> 
> Note that I supplied chmod with weird permission symbol and it didn't
> complain and hasn't returned any failure code.
> 
> Since we have one of the coreutils maintainers in out team :) I thought
> it would be appropriate to ask here whether I should submit the bug
> report to the coreutils developers or is this "feature" here on a
> purpose?  If it's the latter I would like to know why (just to learn
> some history behind it :) )

This is a documented feature, see
(Continue reading)

(GalaxyMaster | 22 Jan 13:18 2009

Re: chmod isn't validating its output?

Dmitry,

On Thu, Jan 22, 2009 at 01:13:34PM +0300, Dmitry V. Levin wrote:

> This is a documented feature, see
> $ info coreutils 'Symbolic Modes'
> especially the node "Copying Permissions".

Thanks you for your explanation.  I wasn't aware of such a feature and
it's really nice that from now on my knowledge of this basic package is
deeper than it was several hours ago when I asked my question.

P.S. BTW, I have had to approve your message since you have posted
from the unsubscribed e-mail address.  If you want to change your
subscription options to this list you can ask me in private. :)

-- 
(GM)

--

-- 
To unsubscribe, e-mail owl-users-unsubscribe <at> lists.openwall.com and reply
to the automated confirmation request that will be sent to you.


Gmane