From de4e0d3001021bb98664c3c23b32fe66c4dc59d0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 10 Feb 2002 13:38:51 +0000 Subject: * (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h, fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc, fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc, fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc, pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc, security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h): Change usage of uid_t to __uid16_t, gid_t to __gid16_t and off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and INVALID_SEEK instead casting -1 to the appropriate type. * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK. * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t types. Don't declare acl functions when compiling Cygwin. * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with correct types for internal usage. --- winsup/cygwin/security.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/security.h') diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h index 53c94c8f9..c4b59dc23 100644 --- a/winsup/cygwin/security.h +++ b/winsup/cygwin/security.h @@ -55,7 +55,7 @@ public: inline PSID set () { return psid = (PSID) sbuf; } BOOL getfrompw (const struct passwd *pw); - BOOL getfromgr (const struct group *gr); + BOOL getfromgr (const struct __group16 *gr); int get_id (BOOL search_grp, int *type = NULL); inline int get_uid () { return get_id (FALSE); } @@ -159,14 +159,14 @@ extern BOOL allow_smbntsec; and group lists so they are somehow security related. Besides that I didn't find a better place to declare them. */ extern struct passwd *internal_getpwent (int); -extern struct group *internal_getgrent (int); +extern struct __group16 *internal_getgrent (int); /* File manipulation */ int __stdcall set_process_privileges (); int __stdcall get_file_attribute (int, const char *, int *, - uid_t * = NULL, gid_t * = NULL); + __uid16_t * = NULL, __gid16_t * = NULL); int __stdcall set_file_attribute (int, const char *, int); -int __stdcall set_file_attribute (int, const char *, uid_t, gid_t, int, const char *); +int __stdcall set_file_attribute (int, const char *, __uid16_t, __gid16_t, int, const char *); LONG __stdcall read_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, LPDWORD sd_size); LONG __stdcall write_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, DWORD sd_size); BOOL __stdcall add_access_allowed_ace (PACL acl, int offset, DWORD attributes, PSID sid, size_t &len_add, DWORD inherit); @@ -186,7 +186,7 @@ void extract_nt_dom_user (const struct passwd *pw, char *domain, char *user); BOOL get_logon_server_and_user_domain (char *logonserver, char *domain); /* sec_helper.cc: Security helper functions. */ -BOOL __stdcall is_grp_member (uid_t uid, gid_t gid); +BOOL __stdcall is_grp_member (__uid16_t uid, __gid16_t gid); /* `lookup_name' should be called instead of LookupAccountName. * logsrv may be NULL, in this case only the local system is used for lookup. * The buffer for ret_sid (40 Bytes) has to be allocated by the caller! */ -- cgit v1.2.3