cvs commit: patches/shadow shadow-4.0.3-DISPLAY.patch

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Thu Oct 2 18:39:31 PDT 2003


tushar      03/10/02 19:39:31

  Added:       shadow   shadow-4.0.3-DISPLAY.patch
  Log:
  Added shadow-4.0.3-DISPLAY.patch
  
  Revision  Changes    Path
  1.1                  patches/shadow/shadow-4.0.3-DISPLAY.patch
  
  Index: shadow-4.0.3-DISPLAY.patch
  ===================================================================
  Submitted By: Tushar Teredesai <tushar at linuxfromscratch.org>
  Date: 2003-10-02
  Initial Package Version: 4.0.3
  Origin: blfs-dev mailing list long time back.
  Description: When "su"ing from one user to another, preserve the
  value of the DISPLAY env var.
  diff -ur shadow-4.0.3/src/su.c shadow-4.0.3.patched/src/su.c
  --- shadow-4.0.3/src/su.c	2002-03-07 22:30:28.000000000 -0600
  +++ shadow-4.0.3.patched/src/su.c	2002-09-16 11:31:28.000000000 -0500
  @@ -252,6 +252,12 @@
   		 */
   		if ((cp = getenv ("TERM")))
   			addenv ("TERM", cp);
  +		/*
  +		 * The display type will be left alone if it is present in
  +		 * the environment already.
  +		 */
  +		if ((cp = getenv ("DISPLAY")))
  +			addenv ("DISPLAY", cp);
   	} else {
   		while (*envp)
   			addenv (*envp++, NULL);
  
  
  



More information about the patches mailing list