Bug 155969 - rc.sysinit needs special code to remove screen directories
rc.sysinit needs special code to remove screen directories
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2005-04-26 07:28 EDT by Russell Coker
Modified: 2014-03-16 22:53 EDT (History)
2 users (show)

See Also:
Fixed In Version: 8.09-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-27 00:33:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Russell Coker 2005-04-26 07:28:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)

Description of problem:
An error is displayed on boot because /var/run/screen/S-username is a 
It seems that the code at about line 570 of rc.sysinit needs to be changed to 
include a line such as the following: 
                */screen)        rm -rf $afile/* ;; 
I believe that the desired functionality is to have the screen directories of 
all users removed on boot.  At boot time there is no valid data in the 
directories or the sockets that they contain.  There is no harm in removing 
the user directories (subdirectories of /var/run/screen/) as they will 
automatically be created when running screen.  It is also desirable to remove 
them as (AFAIK) there is no other way that such directories might be 
automatically removed after an account has been deleted. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1)  Run screen as regular user. 
2)  Reboot machine, preferrably with slow hardware. 
3)  Observe annoying error message about directory /var/run/screen/S-username. 

Additional info:
Comment 1 Bill Nottingham 2005-04-26 09:35:19 EDT
When did we change the location of screen sockets? (again :) )
Comment 2 Russell Coker 2005-04-26 10:14:10 EDT
The change was made recently at my request. 
Having screen sockets in /tmp/screen/S-user was a bad idea.  The problem is 
the case of a machine that had never been used for running screen (or which 
has been freshly booted with tmpfs for /tmp or which has just had a tmpreaper 
program run).  On such a machine a hostile user may create their 
own /tmp/screen directory which would allow them to perform a simple DOS 
attack against other screen users at the minimum and potentially get access to 
proxy data. 
The new location is the same as Gentoo and Debian use and solves these 
Comment 3 Bill Nottingham 2005-04-26 11:30:04 EDT
Historically we had it writing them in the home directory - what happened to
that patch?
Comment 4 Russell Coker 2005-04-26 23:38:14 EDT
I don't know, I guess it disappeared before I started using Fedora for such 
Having them in the home directory is a bad idea anyway.  I'm sure that there 
would be lots of interesting problems occurring when you have /home on an NFS 
server and use the same account on several NFS clients to run screen... 
Comment 5 Bill Nottingham 2005-04-27 00:33:24 EDT
Fixed in 8.09-1.

Note You need to log in before you can comment on or make changes to this bug.