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".
This commit is contained in:
2
chmod.c
2
chmod.c
@@ -107,8 +107,6 @@ parsemode(const char *str)
|
|||||||
if(octal & 00002) mode |= S_IWOTH;
|
if(octal & 00002) mode |= S_IWOTH;
|
||||||
if(octal & 00001) mode |= S_IXOTH;
|
if(octal & 00001) mode |= S_IXOTH;
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
eprintf("not octal\n");
|
|
||||||
}
|
}
|
||||||
for(p = str; *p; p++)
|
for(p = str; *p; p++)
|
||||||
switch(*p) {
|
switch(*p) {
|
||||||
|
Reference in New Issue
Block a user