in VT, screen not being saved (vcsa permission problem to blame)

Bug #367318 reported by Shentino on 2009-04-26
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mc (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: mc

Release: Jaunty Jackalope
Version of MC: Current as of apr 26, 2009
Expected:

MC able to save and restore the subshell screen

Actual:

MC blanks out

To reproduce:

    Log into vt 1 (/dev/tty1)
    Start mc, then use C-o to switch to the subshell. Observe that the screen is blanked.
    Exit mc
    sudo chown you:you /dev/vcsa1 # this is the workaround
    Start mc again
    Use C-o to switch to the subshell and notice that the subshell screen is now properly saved and restored

User's diagnosis:

For some reason /dev/vcsa* permissions aren't being properly set up when a user logs in on a virtual console.

I move that this be considered a bug for which mc is a victim.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: mc 2:4.6.2~git20080311-4ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mc
Uname: Linux 2.6.28-11-generic i686

Related branches

Shentino (shentino) wrote :
Shentino (shentino) wrote :

Just wanted to note this problem was in spite of a fresh distro upgrade from intrepid.

The bug was there too.

I used the same workaround.

Shentino (shentino) wrote :

More information:

Just did a clean install off of the new jaunty CD

Same problem

So it fails to work out of the box on a system I haven't tampered with.

IMHO it's a bug.

My assumption is that login should automatically grant the user teh appropriate perms on the vcs files.

Shentino (shentino) wrote :

Just thought though of one thing that MC *could* do in the meantime, as a workaround.

Since an inaccessible /dev/vcsa device prevents MC from properly saving and restoring the screen when using C-O to flip flop to and from the subshell, methinks that MC should be able to recognize a permission problem and both issue a proper diagnostic and perhaps cease trying.

Shentino (shentino) wrote :

Another workaround: Install fp-compile to get the grab_vcsa

IMO still a bug. I think that mc should work "out of the box", including subshell screen save/restore. At the least, I'd consider it an unexpected annoyance that a regular end user (i.e., one who's not a geek) would be somewhat at a loss to diagnose, and manually mucking about with permissions in /dev definitely sounds heavyweight as far as workarounds go.

Shentino (shentino) on 2009-05-22
description: updated
Shentino (shentino) wrote :

Another workaround that seems like The Right Way (tm):

Make cons.saver sgid tty.

I observed in the changelog in the source that a similiar move was done to accomodate Fedora 7, by making cons.saver suid vcsa. It would appear that sgid tty is the ubuntuese version of that.

Shentino (shentino) wrote :

This fixes the problem.

Changed in mc (Ubuntu):
assignee: nobody → Shentino (shentino)
status: New → Confirmed
Shentino (shentino) on 2009-05-22
Changed in mc (Ubuntu):
assignee: Shentino (shentino) → nobody
Julien Lavergne (gilir) wrote :

Thanks for your work. There is a new version on Debian (4.7.0), do you know if the fix is still necessary ? I quickly backported the packages from Debian on my PPA (https://launchpad.net/~gilir/+archive/unstable) if you need to test it.
Also it will be nice if you can give us a link of the upstream commit about the make cons.saver sgid tty for Fedora.

Shentino (shentino) wrote :

I just test installed the package and the buggy behavior persists.

As far as Fedora, I really don't know which commit it was. It was just mentioned in the change log. It was possibly reverted or perhaps never was done in the ubuntu fork, since it was likely a fedora specific issue.

Honestly, I'd much rather console users be granted the appropriate perms on vcs/vcsa on log in. That seems to be a more appropriate fix. This "sgid tty" is just a workaround for users not having access to their own vcs devs.

Shentino (shentino) wrote :

I also took a look at the PPA you linked to, and it appears that cons.saver isn't even present at all, let alone with the wrong permissions.

Just to be clear, I'm not a developer, just an annoyed end user. My apologies if I'm not much more help.

Shentino (shentino) wrote :

I'd bet my bottom dollar that a permissions problem that causes cons.saver to be unable to access /dev/vcsa* is specific to ubuntu. It worked flawlessly on the last version of Fedora I used, because in Fedora, when you log in on /dev/ttyX, you are automatically granted the appropriate permissions on /dev/vcs(a|)X, so in Fedora, cons.saver doesn't need to be set-id anything to do its job.

I suppose that when Karmic comes out I'll request a free CD and then install that. I'll touch base here again once I've tested the new ubuntu release.

Shentino (shentino) wrote :

Just confirming that this bug is still present in Karmic Koala.

After installation of MC, /usr/lib/mc/mc/cons.saver is verified as being unable to do it's job due to a permission problem while accessing /dev/vcsa*

Suggested fix: grant appropriate permissions on /dev/vcsa* on vt login.
Suggested workaround pending application of fix: make cons.saver sgid tty

Benjamin Drung (bdrung) wrote :

Hi Shentino,

the current version of mc does not build any more in lucid. Therefore I have requested to sync mc 4.7.0-pre1-3 from Debian (bug #411527). When mc 4.7.0-pre1-3 is available in Ubuntu, can you please check if the bug still exists. In this case please create a debdiff with your patch and resubscribe ubuntu-universe-sponsors. Thanks.

Stock upstream mc doesn't do this. I have determiend the cause, permission
problems, and the attached patch solves the problem and at the least shows
exactly what the problem is.

I have had the exact same problem with Gentoo. The solution there is the
same.

Fix the permissions of cons.saver to be sgid tty and all will be well.

I no longer run ubuntu, so I can't help any further with this bug.

On Sun, Jan 3, 2010 at 1:53 PM, Benjamin Drung <email address hidden>wrote:

> Hi Shentino,
>
> the current version of mc does not build any more in lucid. Therefore I
> have requested to sync mc 4.7.0-pre1-3 from Debian (bug #411527). When
> mc 4.7.0-pre1-3 is available in Ubuntu, can you please check if the bug
> still exists. In this case please create a debdiff with your patch and
> resubscribe ubuntu-universe-sponsors. Thanks.
>
> --
> in VT, screen not being saved (vcsa permission problem to blame)
> https://bugs.launchpad.net/bugs/367318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Shentino (shentino) wrote :

I'm sorry to have been rude if I was, but I'm not an ubuntu developer so I really don't know squat about packaging and whatnot. I do, however, have common sense as well as a knack for experimentation.

Cons.saver makes use of vcsa device to do its job, and if it lacks perms it fails to do the C-o magic screen flip.

Empirical evidence obtained by experimentation solidly confirms this as the cause of the problem, both on ubuntu and on gentoo. Flipping-flopping cons.saver from rwxr-xr-x root root to rwxr-sr-x root tty and back again reliably supresses and restores the errant behavior.

Upstream fixes are almost certainly useless for resolving this bug, as device permissions are ostensibly the responsibility of downstream administrators, with sane defaults probably provided by the distros making use of the mc package.

Which would indicate that the appropriate level to have this thing fixed would be by an ubuntu-specific tweak to the perms of cons.saver on installation of mc.

Yury V. Zaytsev (zyv) wrote :

Thanks for the patch, I have included it in the Debian package. You are right, we at Fedora are doing it in the same way. Please notify upstream (Debian) if you want to have your problems resolved in the future.

Changed in mc (Ubuntu):
status: Confirmed → Fix Committed
Benjamin Drung (bdrung) wrote :

It which version is it fixed in Debian?

Yury V. Zaytsev (zyv) wrote :

The fix is committed in the SVN of the mc package. We can't push it out yet because few other issues blocking the package promotion are left to be resolved.

Benjamin Drung (bdrung) wrote :

FYI, you can add "LP: #367318" to debian/changelog to close this bug once you have released the fix.

Yury V. Zaytsev (zyv) wrote :

That's what I did, thanks. Surprisingly enough nobody has reported this issue against Debian, although the functionality has been broken for ages!

Yury V. Zaytsev (zyv) wrote :

Fixed in Debian.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mc - 3:4.7.0.6-1

---------------
mc (3:4.7.0.6-1) unstable; urgency=low

  [Yury V. Zaytsev]
  * New upstream version (bugfix release).
  * Added lintian override for setgid-binary.

  [Denis Briand]
  * Created debian/lintian directory.
  * Created debian/extra/icon directory.
  * Moved debian/extra/icon.xpm to debian/extra/icon/mc.xpm.

mc (3:4.7.0.5-2) unstable; urgency=low

  [Yury V. Zaytsev]
  * More fixes to cons.saver: Hilmar Preusse, Sven Joachim.
    + (Closes: #582078)

mc (3:4.7.0.5-1) unstable; urgency=low

  [Yury V. Zaytsev]
  * New upstream version (bugfix release).
    + (Closes: #564072)
    + (Closes: #476490)
    + (Closes: #502196)
    + (Closes: #551528)
    + (Closes: #565402)
    + (Closes: #564103)
    + (Closes: #543899)
  * Fixed a bug where cons.saver was not installed that went unnoticed.
  * Fixed cons.saver permission bug (Shentino, closes LP: #367318).
  * Fixed wrong libexec scripts location.
  * Now build --with-x by default (obtain modifiers from X when possible).
  * Now disable rpath by default (--disable-rpath).
  * Refreshed Debian-specific patches.
  * Removed invisible cursor notice, bug's been fixed in vte!
  * Removed obsolete compile flag (--with-glib2).
  * Removed obsolete smb.conf path patch (Samba support disabled by default).
  * Removed upstreamed documentation patch.
  * Updated the watch file to track the new upstream download system.

  [Denis Briand]

  * Bumped standards version to 3.8.4.
  * Removed quilt build-dependency and debian/README.source file.

mc (3:4.7.0.1-1) unstable; urgency=low

  [Yury V. Zaytsev]
  * New upstream version (bugfix release).
  * Purged old unneeded links.
  * Updated README.Debian.
  * Updated the list of configuration files to be purged.
  * Updated the list of files and permissions in rules.
  * Updated the list of files to be installed (Closes: #563797)

  [Denis Briand]
  * Fix spelling-error-in-manpage.
 -- Mantas Kriau?i?nas <email address hidden> Fri, 25 Jun 2010 13:37:33 +0100

Changed in mc (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers