Bug 436640 - security_context_to_sid fails for tmpfs
Summary: security_context_to_sid fails for tmpfs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-08 19:03 UTC by Rik van Riel
Modified: 2008-03-08 23:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-08 23:18:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rik van Riel 2008-03-08 19:03:16 UTC
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 23:18:22 UTC
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.