summaryrefslogtreecommitdiffstats
path: root/init/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/builtins.c')
-rw-r--r--init/builtins.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/init/builtins.c b/init/builtins.c
index 550be68..baa3e7f 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -320,6 +320,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;
@@ -337,6 +345,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 },
};