* fhandler.cc (fhandler_base::open): Simplify access evaluation
expression. (fhandler_base::facl): New method. * fhandler.h: Declare facl method in fhandler_base, fhandler_disk_file and fhandler_virtual. * fhandler_disk_file.cc (fhandler_disk_file::facl): New method. * fhandler_virtual.cc (fhandler_virtual::facl): New method. * sec_acl.cc: Remove forward declaration for aclsort32 and acl32. (setacl): Remove static. Add and use handle parameter. (getacl): Ditto. (acl_worker): Reorganize to call fhandler's facl method eventually. (facl32): Ditto. * security.cc (get_nt_object_security): Remove static. * security.h: Add extern declarations for get_nt_object_security, aclsort32, acl32, getacl and setacl. Apply missing syscalls.cc patch and ChangeLog of previous check in. * syscalls.cc (chown_worker): Reorganize to call fhandler's fchown method eventually. (fchown): Ditto.
This commit is contained in:
@ -253,6 +253,8 @@ int __stdcall get_file_attribute (int, HANDLE, const char *, mode_t *,
|
||||
__uid32_t * = NULL, __gid32_t * = NULL);
|
||||
int __stdcall set_file_attribute (bool, HANDLE, const char *, int);
|
||||
int __stdcall set_file_attribute (bool, HANDLE, const char *, __uid32_t, __gid32_t, int);
|
||||
int __stdcall get_nt_object_security (HANDLE, SE_OBJECT_TYPE,
|
||||
security_descriptor &);
|
||||
int __stdcall get_object_attribute (HANDLE handle, SE_OBJECT_TYPE object_type, mode_t *,
|
||||
__uid32_t * = NULL, __gid32_t * = NULL);
|
||||
LONG __stdcall read_sd (const char *file, security_descriptor &sd);
|
||||
@ -266,6 +268,13 @@ void set_security_attribute (int attribute, PSECURITY_ATTRIBUTES psa,
|
||||
|
||||
bool get_sids_info (cygpsid, cygpsid, __uid32_t * , __gid32_t *);
|
||||
|
||||
/* sec_acl.cc */
|
||||
struct __acl32;
|
||||
extern "C" int aclsort32 (int, int, __acl32 *);
|
||||
extern "C" int acl32 (const char *, int, int, __acl32 *);
|
||||
int getacl (HANDLE, const char *, DWORD, int, __acl32 *);
|
||||
int setacl (HANDLE, const char *, int, __acl32 *);
|
||||
|
||||
/* Try a subauthentication. */
|
||||
HANDLE subauth (struct passwd *pw);
|
||||
/* Try creating a token directly. */
|
||||
|
Reference in New Issue
Block a user