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:
Ingo Weinhold 2008-04-02 12:29:59 +00:00
parent 129d25e0da
commit f9bf1195b8

View File

@ -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));