summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/uinfo.cc
diff options
context:
space:
mode:
authorPierre Humblet <phumblet@phumblet.no-ip.org>2004-11-20 19:09:19 +0000
committerPierre Humblet <phumblet@phumblet.no-ip.org>2004-11-20 19:09:19 +0000
commite70bea195b50a129b90a2706d9d7225bc8b68107 (patch)
treeb5f82c0146d36c583753fb2bac2dd1c3a2e373e3 /winsup/cygwin/uinfo.cc
parent0f0fcb042a8e8a80433d7b372cf5a1a3b603d55f (diff)
downloadcygnal-e70bea195b50a129b90a2706d9d7225bc8b68107.tar.gz
cygnal-e70bea195b50a129b90a2706d9d7225bc8b68107.tar.bz2
cygnal-e70bea195b50a129b90a2706d9d7225bc8b68107.zip
2004-11-20 Pierre Humblet <pierre.humblet@ieee.org>
* cygheap.h (cygheap_user::get_windows_id): New method. * registry.h (get_registry_hive_path): Change argument type. (load_registry_hive): Ditto. * registry.cc (get_registry_hive_path): Change argument type and take Win9x keys into account. (load_registry_hive): Ditto. * uinfo.cc (cygheap_user::env_userprofile): Use get_windows_id, even for SYSTEM. * shared.cc (user_shared_initialize): Use get_windows_id. * syscalls.cc (seteuid32): Load the registry hive and reload the user shared also on Win9x.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r--winsup/cygwin/uinfo.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 1b3206ba6..ceab9099c 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -419,11 +419,10 @@ cygheap_user::env_userprofile (const char *name, size_t namelen)
return puserprof;
char userprofile_env_buf[CYG_MAX_PATH + 1];
+ char win_id[UNLEN + 1]; /* Large enough for SID */
+
cfree_and_set (puserprof, almost_null);
- /* FIXME: Should this just be setting a puserprofile like everything else? */
- const char *myname = winname ();
- if (myname && strcasematch (myname, "SYSTEM")
- && get_registry_hive_path (sid (), userprofile_env_buf))
+ if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf))
puserprof = cstrdup (userprofile_env_buf);
return puserprof;