Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-02-06 17:01:54 +0300
committerCorinna Vinschen <corinna@vinschen.de>2003-02-06 17:01:54 +0300
commit565e80155b9e0f3f3fad8a85617d26c797514017 (patch)
tree8613a6bbba76b550c1c71ba79fc165a92e16a0ac /winsup/cygwin/grp.cc
parentf865f0c4799f3e92ce43743bd204437c0d7da45c (diff)
* 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.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index cee32a24f..2d385c6ff 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 *