lkml.org 
[lkml]   [2003]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.044 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site