bugGNU Screen - Bugs: bug #54151, env var TMPDIR gets unset upon...

 
 

bug #54151: env var TMPDIR gets unset upon 'screen' command

Submitter:  None
Submitted:  Tue 19 Jun 2018 09:19:55 AM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  4.6.2
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 20 Jun 2018 07:55:31 AM UTC, comment #2: 

Indeed, my new distro installs Screen setuid. Once I removed the setuid bit and restarted Screen, TMPDIR was again inherited by new shells.

Thank you for the explanation and sorry for the noise.

Anonymous
Tue 19 Jun 2018 05:46:53 PM UTC, comment #1: 

It's not a bug in screen.
It's normal behaviour on glibc systems, where it sanitizes environment for suid applications.
You can check list of sanitized environment variables here:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/generic/unsecvars.h;h=5ea8a4a259ef753c9d0d30aa4c0788e93656d047;hb=HEAD

I assume that your system has screen installed setuid that's why this variable is cleared.
screen itself removes only few variables:
https://git.savannah.gnu.org/cgit/screen.git/tree/src/screen.c?id=c94fdfe9689d1c5dab54c69eb8bb60deed888e57#n1414
all related to its functionality and does copy the rest.

Amadeusz Sławiński <amade>
Group administrator
Tue 19 Jun 2018 09:19:55 AM UTC, original submission:  

When creating a new window by means of a 'screen' command, the new shell doesn't inherit the TMPDIR environment variable.

This despite TMPDIR being set in Screen's environment, as verified in /proc/<screen_pid>/environ . This happens even if Screen is started only with the stock config file ( -c /etc/screenrc ).

I'm on Linux 4.16.14/x86_64.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-19 amade StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code