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>2000-11-16 00:14:27 +0300
committerCorinna Vinschen <corinna@vinschen.de>2000-11-16 00:14:27 +0300
commitcb6f4dbd0c842331a3020b5af31318797cd9a65a (patch)
tree3afd12f3c25b9a0d24e6b1c2edf88c2b62142955 /winsup/cygwin/uinfo.cc
parent66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8 (diff)
* uinfo.cc (internal_getlogin): Change parameter list to reflect
that `token' is member of cygheap_user now. (uinfo_init): Use modified internal_getlogin. * syscalls.cc (seteuid): Ditto.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index c3153966b..5fb7cf955 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -25,7 +25,7 @@ details. */
#include "security.h"
const char *
-internal_getlogin (cygheap_user &user, HANDLE token)
+internal_getlogin (cygheap_user &user)
{
char username[MAX_USER_NAME];
DWORD username_len = MAX_USER_NAME;
@@ -108,8 +108,8 @@ internal_getlogin (cygheap_user &user, HANDLE token)
}
if (allow_ntsec)
{
- HANDLE ptok = token; /* Which is INVALID_HANDLE_VALUE if no
- impersonation took place. */
+ HANDLE ptok = user.token; /* Which is INVALID_HANDLE_VALUE if no
+ impersonation took place. */
DWORD siz;
char tu[1024];
int ret = 0;
@@ -127,7 +127,8 @@ internal_getlogin (cygheap_user &user, HANDLE token)
else if (!(ret = user.set_sid (((TOKEN_USER *) &tu)->User.Sid)))
debug_printf ("Couldn't retrieve SID from access token!");
/* Close token only if it's a result from OpenProcessToken(). */
- if (ptok != INVALID_HANDLE_VALUE && token == INVALID_HANDLE_VALUE)
+ if (ptok != INVALID_HANDLE_VALUE
+ && user.token == INVALID_HANDLE_VALUE)
CloseHandle (ptok);
/* If that failes, try to get the SID from localhost. This can only
@@ -190,8 +191,7 @@ uinfo_init ()
/* If uid is USHRT_MAX, the process is started from a non cygwin
process or the user context was changed in spawn.cc */
if (myself->uid == USHRT_MAX)
- if ((p = getpwnam (internal_getlogin (cygheap->user,
- INVALID_HANDLE_VALUE))) != NULL)
+ if ((p = getpwnam (internal_getlogin (cygheap->user))) != NULL)
{
myself->uid = p->pw_uid;
myself->gid = p->pw_gid;