diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-02-06 14:01:54 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-02-06 14:01:54 +0000 |
commit | 565e80155b9e0f3f3fad8a85617d26c797514017 (patch) | |
tree | 8613a6bbba76b550c1c71ba79fc165a92e16a0ac /winsup/cygwin/grp.cc | |
parent | f865f0c4799f3e92ce43743bd204437c0d7da45c (diff) | |
download | newlib-565e80155b9e0f3f3fad8a85617d26c797514017.zip newlib-565e80155b9e0f3f3fad8a85617d26c797514017.tar.gz newlib-565e80155b9e0f3f3fad8a85617d26c797514017.tar.bz2 |
* security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
declaration of is_grp_member.
* uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
* passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
* grp.cc (pwdgrp::read_group): Change group name to provide better
feedback.
(getgrgid): Use gid16togid32.
* sec_helper.cc (is_grp_member): Delete.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index cee32a2..2d385c6 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -95,6 +95,8 @@ pwdgrp::read_group () if ((gr = internal_getgrsid (cygheap->user.groups.pgsid))) strlcpy (group_name, gr->gr_name, sizeof (group_name)); } + if (myself->uid == UNKNOWN_UID) + strcpy (group_name, "mkpasswd"); /* Feedback... */ snprintf (linebuf, sizeof (linebuf), "%s:%s:%lu:%s", group_name, strbuf, myself->gid, cygheap->user.name ()); debug_printf ("Completing /etc/group: %s", linebuf); @@ -171,7 +173,7 @@ getgrgid (__gid16_t gid) { static struct __group16 g16; /* FIXME: thread-safe? */ - return grp32togrp16 (&g16, getgrgid32 ((__gid32_t) gid)); + return grp32togrp16 (&g16, getgrgid32 (gid16togid32 (gid))); } extern "C" struct __group32 * |