Bug 436640 - security_context_to_sid fails for tmpfs
security_context_to_sid fails for tmpfs
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.1
All Linux
low Severity low
: rc
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2008-03-08 18:18:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):

2.6.18-53.1.6.el5xen

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.