mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 09:18:55 +00:00
Changed option processing to use strtol() to get a umask
get_mode()/s3fs_strtoofft() does not handle octal umask values, which results in unexpected behavior when trying to set a world-readable umask value.
This commit is contained in:
parent
38e6857824
commit
f04b659f5e
@ -3502,7 +3502,7 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
|||||||
return 1; // continue for fuse option
|
return 1; // continue for fuse option
|
||||||
}
|
}
|
||||||
if(0 == STR2NCMP(arg, "umask=")){
|
if(0 == STR2NCMP(arg, "umask=")){
|
||||||
s3fs_umask = get_mode(strchr(arg, '=') + sizeof(char));
|
s3fs_umask = strtol(strchr(arg, '=') + sizeof(char), NULL, 0);
|
||||||
s3fs_umask &= (S_IRWXU | S_IRWXG | S_IRWXO);
|
s3fs_umask &= (S_IRWXU | S_IRWXG | S_IRWXO);
|
||||||
is_s3fs_umask = true;
|
is_s3fs_umask = true;
|
||||||
return 1; // continue for fuse option
|
return 1; // continue for fuse option
|
||||||
|
Loading…
Reference in New Issue
Block a user