* fhandler.h (fhandler_pty_slave::fch_open_handles): Add bool parameter
to declaration. * fhandler_tty.cc (fhandler_pty_slave::fch_open_handles): Add bool parameter "chown". Only request WRITE_OWNER access when opening pty synchronization objects if "chown" is set. (fhandler_pty_slave::fchmod): Call fch_open_handles with new bool parameter set to false. (fhandler_pty_slave::fchown): Call fch_open_handles with new bool parameter set to true. * kernel32.cc (CreateFileMappingW): Fix default standard rights for file mappings from READ_CONTROL to STANDARD_RIGHTS_REQUIRED to allow changing the DACL (fixes "access denied" error in pinfo::set_acl). * fhandler_disk_file.cc (fhandler_base::fstat_helper): Change debug output to print mode bits in octal. * security.cc (alloc_sd): Ditto. (set_file_attribute): Ditto.
This commit is contained in:
@@ -506,7 +506,7 @@ alloc_sd (path_conv &pc, uid_t uid, gid_t gid, int attribute,
|
||||
/* NOTE: If the high bit of attribute is set, we have just created
|
||||
a file or directory. See below for an explanation. */
|
||||
|
||||
debug_printf("uid %u, gid %u, attribute %y", uid, gid, attribute);
|
||||
debug_printf("uid %u, gid %u, attribute 0%o", uid, gid, attribute);
|
||||
|
||||
/* Get owner and group from current security descriptor. */
|
||||
PSID cur_owner_sid = NULL;
|
||||
@@ -964,7 +964,7 @@ set_file_attribute (HANDLE handle, path_conv &pc,
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
syscall_printf ("%d = set_file_attribute(%S, %d, %d, %y)",
|
||||
syscall_printf ("%d = set_file_attribute(%S, %d, %d, 0%o)",
|
||||
ret, pc.get_nt_native_path (), uid, gid, attribute);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user