Bug 236394 - /usr/lib/pm-utils/sleep.d/60sysfont: line 7: /dev/tty0: Permission denied
/usr/lib/pm-utils/sleep.d/60sysfont: line 7: /dev/tty0: Permission denied
Product: Fedora
Classification: Fedora
Component: pm-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Till Maas
Depends On:
  Show dependency treegraph
Reported: 2007-04-13 11:52 EDT by Zack Cerza
Modified: 2008-04-04 11:05 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 11:05:10 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 Zack Cerza 2007-04-13 11:52:24 EDT
Description of problem:
The following appears in /var/log/pm-suspend.log when resuming from a hibernate:

Fri Apr 13 11:44:02 EDT 2007: running thaw hooks.
===== Fri Apr 13 11:44:02 EDT 2007: running hook:
/usr/lib/pm-utils/sleep.d/99video =====
===== Fri Apr 13 11:44:03 EDT 2007: running hook:
/usr/lib/pm-utils/sleep.d/95led =====
===== Fri Apr 13 11:44:03 EDT 2007: running hook:
/usr/lib/pm-utils/sleep.d/94cpufreq =====
===== Fri Apr 13 11:44:03 EDT 2007: running hook:
/usr/lib/pm-utils/sleep.d/90clock =====
===== Fri Apr 13 11:44:17 EDT 2007: running hook:
/usr/lib/pm-utils/sleep.d/65alsa =====
===== Fri Apr 13 11:44:17 EDT 2007: running hook:
/usr/lib/pm-utils/sleep.d/60sysfont =====
/usr/lib/pm-utils/sleep.d/60sysfont: line 7: /dev/tty0: Permission denied

Unsure of how serious this is, but I thought I'd report it.

Version-Release number of selected component (if applicable):
Comment 1 Richard Hughes 2007-05-24 08:05:56 EDT
pjones, is this code even present anymore?
Comment 2 Zack Cerza 2007-05-24 10:38:14 EDT
% grep sysfont /usr/lib/pm-utils/sleep.d/60sysfont
                setsysfont </dev/tty0 ;;
% rpm -q pm-utils
Comment 3 Till Maas 2007-09-19 20:34:08 EDT
Do you have any idea, why this happens? It works fine for me.
Hm, /etc/rc.d/rc.sysinit has this code:

231 if [ -x /sbin/setsysfont -a -c /dev/tty1 ]; then
232    /sbin/setsysfont < /dev/tty1 > /dev/tty1 2>/dev/null
233 fi

I guess I will change the hook in pm-utils to this, too. The previous hook was
copied from /etc/rc.d/rc.sysinit, too.
Comment 4 Ben Liblit 2007-09-23 14:28:05 EDT
I'm seeing the same logged error message on my desktop box.  I see it when
resuming from either suspend or hibernate.

My environment:

    Fedora 7

To try to understand why permission is being denied, I modified 60sysfont to run
two additional commands just before setsysfont:

    id -a
    ls --lcontext /dev/tty0
    setsysfont </dev/tty0 ;;

This yields the following output:

    uid=0(root) gid=0(root) context=system_u:system_r:hald_t
    crw-rw---- 1 system_u:object_r:tty_device_t   root root 4, 0 Sep 23 00:34
    /usr/lib/pm-utils/sleep.d/60sysfont: line 9: /dev/tty0: Permission denied

I don't understand all of the security context stuff, but from a traditional
Unix permissions perspective it certainly looks like setsysfont ought to be able
to read /dev/tty0.  I'm stumped.
Comment 5 Till Maas 2007-09-26 14:26:31 EDT
Do you use selinux? When selinux prevents access, there should be a line about
it in /var/log/messages.
Comment 6 Ben Liblit 2007-10-02 00:18:43 EDT
I use the SELinux targeted policy.  I have inspected /var/log/messages and I see
no SELinux audit messages around the relevant time.  It's pretty easy to look
for these, since both /var/log/messages and /var/log/pm-suspend.log have
timestamps.  So I'm pretty confident that I would have seen an SELinux audit
message if one were present.
Comment 7 Bug Zapper 2008-04-03 20:04:47 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 8 Zack Cerza 2008-04-04 11:05:10 EDT
Haven't seen this in F9-rawhide.

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