diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-05-28 14:10:55 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-05-28 14:10:55 +0000 |
commit | 571964058165952634fce744588d588096cd1c2c (patch) | |
tree | 753fe9a6289181cd0218d36b7b57486194191bf8 /winsup/cygwin/sec_helper.cc | |
parent | f542ad4e14fae736164e354cd0f456427c82870c (diff) | |
download | cygnal-571964058165952634fce744588d588096cd1c2c.tar.gz cygnal-571964058165952634fce744588d588096cd1c2c.tar.bz2 cygnal-571964058165952634fce744588d588096cd1c2c.zip |
Change internal gid datatype from __gid16_t to __gid32_t
throughout.
* cygwin.din: Export new symbols chown32, fchown32, getegid32,
getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
setgid32, setegid32, getgrent32.
* grp.cc (grp32togrp16): New static function.
(getgrgid32): New function.
(getgrnam32): Ditto.
(getgrent32): Ditto.
(getgroups32): Change name of internal function from getgroups.
(getgroups32): New function.
(initgroups32): Ditto.
* syscalls.cc (chown32): Ditto.
(lchown32): Ditto.
(fchown32): Ditto.
(setegid32): Ditto.
(setgid32): Ditto.
* uinfo.cc (getgid32): Ditto.
(getegid32): Ditto.
* include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
Diffstat (limited to 'winsup/cygwin/sec_helper.cc')
-rw-r--r-- | winsup/cygwin/sec_helper.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 365364d9f..c5341128f 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -127,7 +127,7 @@ cygsid::getfrompw (const struct passwd *pw) } BOOL -cygsid::getfromgr (const struct __group16 *gr) +cygsid::getfromgr (const struct __group32 *gr) { char *sp = (gr && gr->gr_passwd) ? gr->gr_passwd : NULL; return (*this = sp ?: "") != NULL; @@ -174,7 +174,7 @@ cygsid::get_id (BOOL search_grp, int *type) } if (search_grp || type) { - struct __group16 *gr; + struct __group32 *gr; for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx) { if (sid.getfromgr (gr) && sid == psid) @@ -224,7 +224,7 @@ cygsid::get_id (BOOL search_grp, int *type) *type = GROUP; if (id == -1) { - struct __group16 *gr = getgrnam (account); + struct __group32 *gr = getgrnam32 (account); if (gr) id = gr->gr_gid; } @@ -249,16 +249,16 @@ cygsid::get_id (BOOL search_grp, int *type) } BOOL -is_grp_member (__uid16_t uid, __gid16_t gid) +is_grp_member (__uid32_t uid, __gid32_t gid) { - extern int getgroups (int, __gid16_t *, __gid16_t, const char *); + extern int getgroups32 (int, __gid32_t *, __gid32_t, const char *); BOOL grp_member = TRUE; struct passwd *pw = getpwuid (uid); - __gid16_t grps[NGROUPS_MAX]; - int cnt = getgroups (NGROUPS_MAX, grps, - pw ? pw->pw_gid : myself->gid, - pw ? pw->pw_name : cygheap->user.name ()); + __gid32_t grps[NGROUPS_MAX]; + int cnt = getgroups32 (NGROUPS_MAX, grps, + pw ? pw->pw_gid : myself->gid, + pw ? pw->pw_name : cygheap->user.name ()); int i; for (i = 0; i < cnt; ++i) if (grps[i] == gid) |