Hide Forgot
# strace -s 1024 -f mount -t tmpfs none /tmp/foo -o context="system_u:object_r:tmp_t:s0:c127,c456" 2> err # fgrep 'mount(' err | tail -1 [pid 8959] mount("none", "/tmp/foo", "tmpfs", MS_MGC_VAL, "context= \"system_u:object_r:tmp_t:s0:c127\",c456") = -1 EINVAL (Invalid argument) https://bugzilla.redhat.com/show_bug.cgi?id=219611 Reported and fixed this problem in RHEL5.
The problem is that the above command is not quoted enough for the shell. Bash strips off your " around the context, before the ARGV get to mount. So mount sees an ambiguous option string. Double quoting works succesfully: mount -t tmpfs none /tmp/foo -o 'context="system_u:object_r:tmp_t:s0:c127,c456"' This needs to be documented in the mount(8) man page for 'context', since it is very non-obvious what's going wrong.
Fixed by upstream commit 3142564b244b3163446d59f83390f73cea85097b. Fedora package will be updated ASAP.
util-linux-2.20.1-2.2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/util-linux-2.20.1-2.2.fc16
Package util-linux-2.20.1-2.2.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing util-linux-2.20.1-2.2.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-0815/util-linux-2.20.1-2.2.fc16 then log in and leave karma (feedback).
util-linux-2.20.1-2.2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.