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:
authorChristopher Faylor <me@cgf.cx>2002-06-29 10:40:19 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-29 10:40:19 +0400
commit664075a3bb1796ddc4254fcf9a85b98972e03681 (patch)
treebed40b3c0c56f11bc262c70cdc6d427d4c5f396b
parente97962b92a9be22101b72f840b306b6aca5056ea (diff)
* environ.cc (spenv::from_cygheap): Still need to take setuid into
consideration.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/environ.cc2
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 983b961f1..9800f1cc1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-29 Christopher Faylor <cgf@redhat.com>
+
+ * environ.cc (spenv::from_cygheap): Still need to take setuid into
+ consideration.
+
2002-06-28 Christopher Faylor <cgf@redhat.com>
* uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case
@@ -13,7 +18,7 @@
* cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name
change.
* environ.cc (getwinenveq): New function.
- (spenv::from_cygheap): Change arguments.
+ (penv::from_cygheap): penv::from_cygheap): Change arguments.
(spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info
from environment. Always return value from cygwin environment, if it
exists.
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index ae7268fdf..b86b6b8d1 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -817,7 +817,7 @@ spenv::retrieve (bool no_envblock, const char *const envname)
if (from_cygheap)
{
const char *p;
- if (envname)
+ if (envname && !cygheap->user.issetuid ())
{
debug_printf ("duping existing value for '%s'", name);
return cstrdup1 (envname); /* Don't really care what it's set to