Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Wed, 10 Sep 2003 18:29:16 +1000 | From | Anton Blanchard <> | Subject | [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.
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); _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |