Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 155969 - rc.sysinit needs special code to remove screen directories
Summary: rc.sysinit needs special code to remove screen directories
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-26 11:28 UTC by Russell Coker
Modified: 2014-03-17 02:53 UTC (History)
2 users (show)

Fixed In Version: 8.09-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-27 04:33:24 UTC


Attachments (Terms of Use)

Description Russell Coker 2005-04-26 11:28:34 UTC
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 
directory. 
 
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:
Always

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 13:35:19 UTC
When did we change the location of screen sockets? (again :) )

Comment 2 Russell Coker 2005-04-26 14:14:10 UTC
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 
problems. 

Comment 3 Bill Nottingham 2005-04-26 15:30:04 UTC
Historically we had it writing them in the home directory - what happened to
that patch?

Comment 4 Russell Coker 2005-04-27 03:38:14 UTC
I don't know, I guess it disappeared before I started using Fedora for such 
things. 
 
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 04:33:24 UTC
Fixed in 8.09-1.


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