mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
vfs: Simplify connect_acl_tdb()
We don't need talloc for printing a mask with %o Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
This commit is contained in:
parent
d088738342
commit
8f1d903524
@ -274,23 +274,20 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle,
|
||||
|
||||
if (config->ignore_system_acls) {
|
||||
mode_t create_mask = lp_create_mask(SNUM(handle->conn));
|
||||
char *create_mask_str = NULL;
|
||||
|
||||
if ((create_mask & 0666) != 0666) {
|
||||
char create_mask_str[16];
|
||||
|
||||
create_mask |= 0666;
|
||||
create_mask_str = talloc_asprintf(handle, "0%o",
|
||||
snprintf(create_mask_str,
|
||||
sizeof(create_mask_str),
|
||||
"0%o",
|
||||
create_mask);
|
||||
if (create_mask_str == NULL) {
|
||||
DBG_ERR("talloc_asprintf failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
DBG_NOTICE("setting 'create mask = %s'\n", create_mask_str);
|
||||
|
||||
lp_do_parameter (SNUM(handle->conn),
|
||||
"create mask", create_mask_str);
|
||||
|
||||
TALLOC_FREE(create_mask_str);
|
||||
}
|
||||
|
||||
DBG_NOTICE("setting 'directory mask = 0777', "
|
||||
|
Loading…
Reference in New Issue
Block a user