* shared.cc (__sec_user): Split into sec_acl() and call orig_sid().

(sec_acl): Create from part of __sec_user(), except creator/owner.
	* security.h: Define sec_acl() and MAX_DACL_LEN.
This commit is contained in:
Corinna Vinschen
2002-05-13 12:10:49 +00:00
parent 6eabab557a
commit 043bc3e1ee
3 changed files with 44 additions and 42 deletions

View File

@ -16,6 +16,8 @@ details. */
#define DEFAULT_GID DOMAIN_ALIAS_RID_ADMINS
#define MAX_SID_LEN 40
#define MAX_DACL_LEN(n) (sizeof (ACL) \
+ (n) * (sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD) + MAX_SID_LEN))
#define NO_SID ((PSID)NULL)
@ -201,6 +203,7 @@ SECURITY_DESCRIPTOR *__stdcall get_null_sd (void);
extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID sa_buf, PSID sid2, BOOL inherit)
__attribute__ ((regparm (3)));
extern BOOL sec_acl (PACL acl, BOOL admins, PSID sid1 = NO_SID, PSID sid2 = NO_SID);
int __stdcall NTReadEA (const char *file, const char *attrname, char *buf, int len);
BOOL __stdcall NTWriteEA (const char *file, const char *attrname, const char *buf, int len);