Bug 436640 - security_context_to_sid fails for tmpfs
security_context_to_sid fails for tmpfs
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
Depends On:
  Show dependency treegraph
Reported: 2008-03-08 14:03 EST by Rik van Riel
Modified: 2008-03-08 18:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-08 18:18:22 EST
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 Rik van Riel 2008-03-08 14:03:16 EST
Description of problem:

In /etc/fstab:

tmpfs                   /var/spool/exim/input   tmpfs  
uid=exim,gid=exim,context=system_u:object_r:var_spool_t,size=20M,mode=0750 0 0
tmpfs                   /var/spool/spamikaze    tmpfs  
uid=exim,gid=exim,context=system_u:object_r:var_spool_t,size=20M,mode=0750 0 0

Trying to mount these filesystems fails with:

# mount /var/spool/spamikaze/
SELinux: security_context_to_sid(system_u:object_r:var_spool_t) failed for (dev
tmpfs, type tmpfs) errno=-22

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


Expected results:

The security context is valid, since other directories are labeled that way.  I
have no idea why security_context_to_sid would fail for an already known context.

It would be nice if the tmpfs mount worked...
Comment 1 Rik van Riel 2008-03-08 18:18:22 EST
Never mind - the security context now needs an :s0 appended for this to work.

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