aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-06-24 15:40:57 +0000
committerCorinna Vinschen <corinna@vinschen.de>2002-06-24 15:40:57 +0000
commit1fd072b6e49bf5e8c1202b7d3233486e1cf82420 (patch)
tree4f357afb4f12fa8fa10914c6d412ef5047efe3e1
parentde0557f7a394b4af6a41478c4208a4eb587964a9 (diff)
downloadnewlib-1fd072b6e49bf5e8c1202b7d3233486e1cf82420.zip
newlib-1fd072b6e49bf5e8c1202b7d3233486e1cf82420.tar.gz
newlib-1fd072b6e49bf5e8c1202b7d3233486e1cf82420.tar.bz2
* uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
of user.real_uid and user.real_gid. (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto for gid.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/uinfo.cc12
2 files changed, 13 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b44351f..6ff5adf 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2002-06-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
+ of user.real_uid and user.real_gid.
+ (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
+ for gid.
+
2002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
* security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index fe9e30d..e1e9077 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -88,13 +88,13 @@ internal_getlogin (cygheap_user &user)
if (pw)
{
- user.real_uid = pw->pw_uid;
- user.real_gid = pw->pw_gid;
+ myself->uid = pw->pw_uid;
+ myself->gid = pw->pw_gid;
}
else
{
- user.real_uid = DEFAULT_UID;
- user.real_gid = DEFAULT_GID;
+ myself->uid = DEFAULT_UID;
+ myself->gid = DEFAULT_GID;
}
(void) cygheap->user.ontherange (CH_HOME, pw);
@@ -109,8 +109,8 @@ uinfo_init ()
internal_getlogin (cygheap->user); /* Set the cygheap->user. */
/* Real and effective uid/gid are identical on process start up. */
- myself->uid = cygheap->user.orig_uid = cygheap->user.real_uid;
- myself->gid = cygheap->user.orig_gid = cygheap->user.real_gid;
+ cygheap->user.orig_uid = cygheap->user.real_uid = myself->uid;
+ cygheap->user.orig_gid = cygheap->user.real_gid = myself->gid;
cygheap->user.set_orig_sid(); /* Update the original sid */
cygheap->user.token = INVALID_HANDLE_VALUE; /* No token present */