Commit Graph

22 Commits

Author SHA1 Message Date
FRIGN eee98ed3a4 Fix coding style
It was about damn time. Consistency is very important in such a
big codebase.
2014-11-13 18:08:43 +00:00
sin 0c5b7b9155 Stop using EXIT_{SUCCESS,FAILURE} 2014-10-02 23:46:59 +01:00
Hiltjo Posthuma 90861840b7 chmod: process file series behaviour
continue processing files if a chmod on a file in a series failed, but return with an error status code.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-24 11:51:43 +01:00
Hiltjo Posthuma bd99b92e91 parsemode: rework
- for octal input: reset mode to 0.
- take umask into account.
- make '=rwx' etc work.
- we wont support crazy but valid modes like "a+rw,g=x,o=g"
- uudecode: use parsemode, mask is 0.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-24 11:51:33 +01:00
sin f488547779 Don't bail out if chmod(2) or chown(2) fails
Keep processing all the files specified.
2014-04-22 13:46:28 +01:00
Hiltjo Posthuma 560340341f make parsemode() generic
use for uudecode and chmod

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 15:40:32 +01:00
sin d9a1030d57 We do symbolic options for chmod(1)
Don't bomb out if the argument is not a valid octal number, it
could very well be something like "chmod +x test".
2014-03-04 11:05:01 +00:00
dsp 2e98468788 check for valid octal input and crude range check on that for validity 2014-02-01 19:50:52 +00:00
Markus Wichmann a55cc8c95e Make chmod and ls recognize sticky bit (S_ISVTX). 2013-10-20 10:41:32 +01:00
Markus Wichmann 35053c1d48 Make chmod honor S_ISVTX. 2013-10-20 10:41:31 +01:00
sin d8718d4159 Do not interpret -[rwxs] as options in chmod(1)
To chmod recursively use `-R' as opposed to `-r' so we can
distinguish it from the mode `-r'.
2013-10-11 17:02:58 +01:00
sin b5a511dacf Exit with EXIT_SUCCESS/EXIT_FAILURE instead of 0 and 1
Fixed for consistency purposes.
2013-10-07 16:44:22 +01:00
stateless 7216a53a7e Remove unnecessary exit(1) in usage()
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-06-19 19:58:19 +02:00
Christoph Lohmann 4d38f60685 Eliminating the getopt disgrace. 2013-06-14 20:20:47 +02:00
Connor Lane Smith 20d526391d chmod, chown: remove redundant flag 2012-05-25 21:52:01 +01:00
Connor Lane Smith 0cca0c209b whoops, chmod = 2011-06-11 00:31:44 +01:00
Connor Lane Smith 26723ba0dc symbolic chmod, thanks pancake 2011-06-11 00:30:07 +01:00
Connor Lane Smith 954106050f rename estrtol 2011-06-10 14:55:01 +01:00
Connor Lane Smith ba456787cb chmod: strnum 2011-06-10 05:44:00 +01:00
Connor Lane Smith d90ced2047 consistent error check 2011-06-04 12:20:41 +01:00
Connor Lane Smith 04bac53826 chmod: no S_ISVTX 2011-05-29 20:38:03 +01:00
Connor Lane Smith 2dfe5c6b8b octal-only chmod 2011-05-27 23:48:07 +01:00