diff options
author | Anton Blanchard <anton@samba.org> | 2003-09-09 19:39:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-09-09 19:39:55 -0700 |
commit | 6fd5c7bf5c800c3083343d273f45dc5fc1b53da1 (patch) | |
tree | 2dd825c6692eb4313d2cacd1175108a6bee1ed4e /init | |
parent | bda366d744be7e7496ee78a5c663881cfb301ebc (diff) | |
download | history-6fd5c7bf5c800c3083343d273f45dc5fc1b53da1.tar.gz |
[PATCH] Fix initramfs permissions on directories and special files
Set correct permissions on initramfs directories and special files. We dont
want to obey the umask here, so do the same thing we do on normal files -
call sys_chmod.
Diffstat (limited to 'init')
-rw-r--r-- | init/initramfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index cbd1a538d85e3f..7bbb68275983f6 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -261,11 +261,13 @@ static int __init do_name(void) } else if (S_ISDIR(mode)) { sys_mkdir(collected, mode); sys_chown(collected, uid, gid); + sys_chmod(collected, mode); } else if (S_ISBLK(mode) || S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode)) { if (maybe_link() == 0) { sys_mknod(collected, mode, rdev); sys_chown(collected, uid, gid); + sys_chmod(collected, mode); } } else panic("populate_root: bogus mode: %o\n", mode); |