screen-cleanup: check SCREENDIR

Bug #13143 reported by 66dny9r02
6
Affects Status Importance Assigned to Milestone
screen (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

The current /etc/init.d/screen-cleanup script doesn't check whether SCREENDIR
(/var/run/screen) exists, which generates a spurious error if it doesn't exist.
(Screen works without a problem because it creates the directory later on.) This
situation occurs when /var/run is on a tmpfs (which works with the other init
scripts).
A proposed patch is included.

Revision history for this message
66dny9r02 (66dny9r02) wrote :

Created an attachment (id=1412)
patch for screen-cleanup to check SCREENDIR

Revision history for this message
Matt Zimmerman (mdz) wrote :

Mounting a tmpfs over /var/run is not supported, because it masks directories
which are placed there by the packaging system.

Passing this bug to Martin, because he seems interested in making it work
anyway. :-) Bear in mind that this duplicates packaging data in two places
(i.e., the ownership and mode of the directory), in the .deb and in the init
script, which is undesirable.

Revision history for this message
Martin Pitt (pitti) wrote :

Hi!

(In reply to comment #0)
> The current /etc/init.d/screen-cleanup script doesn't check whether SCREENDIR
> (/var/run/screen) exists, which generates a spurious error if it doesn't exist.
> (Screen works without a problem because it creates the directory later on.) This
> situation occurs when /var/run is on a tmpfs (which works with the other init
> scripts).
> A proposed patch is included.

Your patch is not sufficient, screen does _not_ work without the directory:

$ screen
Cannot make directory '/var/run/screen': Permission denied

Which is understandable since screen is only setgid utmp, and /var/run is
root:root 0750. So the patch should be modified to create the directory if it is
not present already and the directory should not be shipped in the deb any more.

Revision history for this message
Martin Pitt (pitti) wrote :

 screen (4.0.2-4.1ubuntu2) hoary; urgency=low
 .
   * debian/init: Create /var/run/screen if it does not exist. This makes
     screen work even if /var/run is mounted at a tmpfs. (Ubuntu #6788)

Revision history for this message
66dny9r02 (66dny9r02) wrote :

(In reply to comment #3)
[snip]
> Your patch is not sufficient, screen does _not_ work without the directory:
>
> $ screen
> Cannot make directory '/var/run/screen': Permission denied

Ah, sorry I didn't catch that one and thanks for fixing it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.