Use a reasonable umask when creating directories.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24744 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
129d25e0da
commit
f9bf1195b8
@ -48,6 +48,8 @@ const char* kMountPoint = "/myfs";
|
||||
static int sArgc;
|
||||
static const char* const* sArgv;
|
||||
|
||||
static mode_t sUmask = 0022;
|
||||
|
||||
|
||||
static fssh_status_t
|
||||
init_kernel()
|
||||
@ -687,7 +689,8 @@ create_dir(const char *path, bool createParents)
|
||||
}
|
||||
|
||||
// make the directory
|
||||
error = _kern_create_dir(-1, path, FSSH_S_IRWXU);
|
||||
error = _kern_create_dir(-1,
|
||||
path, (FSSH_S_IRWXU | FSSH_S_IRWXG | FSSH_S_IRWXO) & ~sUmask);
|
||||
if (error != FSSH_B_OK) {
|
||||
fprintf(stderr, "Error: Failed to make directory \"%s\": %s\n", path,
|
||||
fssh_strerror(error));
|
||||
|
Loading…
Reference in New Issue
Block a user