[Pkg-shadow-commits] r3016 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Fri Jun 5 22:19:38 UTC 2009
Author: nekral-guest
Date: 2009-06-05 22:19:38 +0000 (Fri, 05 Jun 2009)
New Revision: 3016
Modified:
upstream/trunk/ChangeLog
upstream/trunk/NEWS
upstream/trunk/src/su.c
Log:
* NEWS, src/su.c: Preserve the DISPLAY and XAUTHORITY environment
variables, even with --login. This was not the case before in the
PAM version.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-06-05 22:16:56 UTC (rev 3015)
+++ upstream/trunk/ChangeLog 2009-06-05 22:19:38 UTC (rev 3016)
@@ -1,5 +1,11 @@
2009-06-06 Nicolas François <nicolas.francois at centraliens.net>
+ * NEWS, src/su.c: Preserve the DISPLAY and XAUTHORITY environment
+ variables, even with --login. This was not the case before in the
+ PAM version.
+
+2009-06-06 Nicolas François <nicolas.francois at centraliens.net>
+
* src/useradd.c, src/groupmod.c, src/groupadd.c, src/faillog.c:
Fix typos. Take this opportunity to split the usage messages into
smaller messages (one per option).
Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS 2009-06-05 22:16:56 UTC (rev 3015)
+++ upstream/trunk/NEWS 2009-06-05 22:19:38 UTC (rev 3016)
@@ -2,6 +2,9 @@
shadow-4.1.4.1 -> shadow-4.1.4.2 UNRELEASED
+- su
+ * Preserve the DISPLAY and XAUTHORITY environment variables. This was
+ only the case in the non PAM enabled versions.
shadow-4.1.4 -> shadow-4.1.4.1 2009-05-22
Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c 2009-06-05 22:16:56 UTC (rev 3015)
+++ upstream/trunk/src/su.c 2009-06-05 22:19:38 UTC (rev 3016)
@@ -559,7 +559,8 @@
* (note: in the case of a subsystem, the shell will be restricted,
* and this won't be executed on the first pass)
*/
- if (fakelogin && change_environment) {
+ if (change_environment) {
+ if (fakelogin) {
/*
* The terminal type will be left alone if it is present in
* the environment already.
@@ -595,6 +596,7 @@
if (NULL != cp) {
addenv (cp, NULL); /* set the default $HZ, if one */
}
+#endif /* !USE_PAM */
/*
* Also leave DISPLAY and XAUTHORITY if present, else
@@ -608,7 +610,7 @@
if (NULL != cp) {
addenv ("XAUTHORITY", cp);
}
-#endif /* !USE_PAM */
+ }
} else {
while (NULL != *envp) {
addenv (*envp, NULL);
More information about the Pkg-shadow-commits
mailing list