diff options
Diffstat (limited to 'init/builtins.c')
| -rw-r--r-- | init/builtins.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/init/builtins.c b/init/builtins.c index 5bda7a0..bb963c1 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -322,6 +322,14 @@ int do_mkdir(int nargs, char **args) if (_chown(args[1], uid, gid) < 0) { return -errno; } + + /* chown may have cleared S_ISUID and S_ISGID, chmod again */ + if (mode & (S_ISUID | S_ISGID)) { + ret = _chmod(args[1], mode); + if (ret == -1) { + return -errno; + } + } } return 0; @@ -339,6 +347,12 @@ static struct { { "ro", MS_RDONLY }, { "rw", 0 }, { "remount", MS_REMOUNT }, + { "bind", MS_BIND }, + { "rec", MS_REC }, + { "unbindable", MS_UNBINDABLE }, + { "private", MS_PRIVATE }, + { "slave", MS_SLAVE }, + { "shared", MS_SHARED }, { "defaults", 0 }, { 0, 0 }, }; |
