Check that the mode argument to fsdb's `chmod' command contains no
inode type bits set. Previously it would let you set IFMT bits (but not clear them). The `chtype' command should be be used instead for changing the inode type; having chmod half-work only causes confusion.
This commit is contained in:
parent
c2f9738fda
commit
75249b648a
@ -669,7 +669,7 @@ CMDFUNCSTART(chmode)
|
||||
return 1;
|
||||
|
||||
modebits = strtol(argv[1], &cp, 8);
|
||||
if (cp == argv[1] || *cp != '\0' ) {
|
||||
if (cp == argv[1] || *cp != '\0' || (modebits & ~07777)) {
|
||||
warnx("bad modebits `%s'", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user