diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-02-10 13:38:51 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-02-10 13:38:51 +0000 |
commit | de4e0d3001021bb98664c3c23b32fe66c4dc59d0 (patch) | |
tree | 5324c8fc5fd5157ae0adb3ada3218af9accb0528 /winsup/cygwin/security.cc | |
parent | a505db6554fb96d8eecce221378decbf3edf6b2e (diff) | |
download | cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.tar.gz cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.tar.bz2 cygnal-de4e0d3001021bb98664c3c23b32fe66c4dc59d0.zip |
* (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.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r-- | winsup/cygwin/security.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 82daa13f8..73ee73fd3 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -42,7 +42,6 @@ details. */ #include "ntdll.h" #include "lm.h" - extern BOOL allow_ntea; BOOL allow_ntsec; /* allow_smbntsec is handled exclusively in path.cc (path_conv::check). @@ -451,7 +450,7 @@ get_user_primary_group (WCHAR *wlogonserver, const char *user, static int get_supplementary_group_sidlist (const char *username, cygsidlist &grp_list) { - struct group *gr; + struct __group16 *gr; int cnt = 0; for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx) @@ -1086,7 +1085,7 @@ write_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, DWORD sd_size) static int get_nt_attribute (const char *file, int *attribute, - uid_t *uidret, gid_t *gidret) + __uid16_t *uidret, __gid16_t *gidret) { if (!wincap.has_security ()) return 0; @@ -1124,8 +1123,8 @@ get_nt_attribute (const char *file, int *attribute, return -1; } - uid_t uid = cygsid(owner_sid).get_uid (); - gid_t gid = cygsid(group_sid).get_gid (); + __uid16_t uid = cygsid(owner_sid).get_uid (); + __gid16_t gid = cygsid(group_sid).get_gid (); if (uidret) *uidret = uid; if (gidret) @@ -1235,7 +1234,7 @@ get_nt_attribute (const char *file, int *attribute, int get_file_attribute (int use_ntsec, const char *file, - int *attribute, uid_t *uidret, gid_t *gidret) + int *attribute, __uid16_t *uidret, __gid16_t *gidret) { int res; @@ -1306,7 +1305,7 @@ add_access_denied_ace (PACL acl, int offset, DWORD attributes, } PSECURITY_DESCRIPTOR -alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute, +alloc_sd (__uid16_t uid, __gid16_t gid, const char *logsrv, int attribute, PSECURITY_DESCRIPTOR sd_ret, DWORD *sd_size_ret) { BOOL dummy; @@ -1334,7 +1333,7 @@ alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute, /* Get SID and name of new group. */ cygsid group_sid (NO_SID); - struct group *grp = getgrgid (gid); + struct __group16 *grp = getgrgid (gid); if (grp) { if ((!grp || !group_sid.getfromgr (grp)) @@ -1575,7 +1574,7 @@ set_security_attribute (int attribute, PSECURITY_ATTRIBUTES psa, } static int -set_nt_attribute (const char *file, uid_t uid, gid_t gid, +set_nt_attribute (const char *file, __uid16_t uid, __gid16_t gid, const char *logsrv, int attribute) { if (!wincap.has_security ()) @@ -1601,7 +1600,7 @@ set_nt_attribute (const char *file, uid_t uid, gid_t gid, int set_file_attribute (int use_ntsec, const char *file, - uid_t uid, gid_t gid, + __uid16_t uid, __gid16_t gid, int attribute, const char *logsrv) { int ret = 0; |