* [PATCH] Fix initramfs permissions on directories and special files
@ 2003-09-10 8:29 Anton Blanchard
0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2003-09-10 8:29 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
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.
work-anton/init/initramfs.c | 2 ++
1 files changed, 2 insertions(+)
diff -puN init/initramfs.c~initramfs-fix init/initramfs.c
--- work/init/initramfs.c~initramfs-fix 2003-09-10 03:11:58.000000000 -0500
+++ work-anton/init/initramfs.c 2003-09-10 03:11:58.000000000 -0500
@@ -260,11 +260,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);
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-10 8:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-10 8:29 [PATCH] Fix initramfs permissions on directories and special files Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®