Skip to contentSkip to conversation

setfiles - should not fail on ro fs

DISCUSSION Bastian Blank 2 participants 2 messages Dec 6, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw

hi folks

setfiles should not fail on r/o filesystems:

| /usr/sbin/setfiles:  labeling files under /boot301
| /boot301: Read-only file system
| /usr/sbin/setfiles:  unable to relabel /boot301 to system_u:object_r:file_t
| /usr/sbin/setfiles:  error while labeling files under /boot301
| make: *** [relabel] Error 1

bastian

Signature · 3 lines
Genius doesn't work on an assembly line basis.  You can't simply say,
"Today I will be brilliant."
		-- Kirk, "The Ultimate Computer", stardate 4731.3
#1 lore raw
Quoted 9 lines · Bastian Blank

hi folks

setfiles should not fail on r/o filesystems:

| /usr/sbin/setfiles:  labeling files under /boot301
| /boot301: Read-only file system
| /usr/sbin/setfiles:  unable to relabel /boot301 to
| system_u:object_r:file_t /usr/sbin/setfiles:  error while labeling files
| under /boot301
| make: *** [relabel] Error 1

relabel: $(FC) $(SETFILES)

        $(SETFILES) $(FC) `mount | awk '/ext[23].*rw/{print $$3}'`

In my tree I've changed the relabel rule to the above. Please try it out and let me know how it goes. It should cause "make relabel" to not attempt to relabel ro mounted file systems.

Having setfiles return an error if it can't relabel is correct behavior. Determining which file systems to label is the job of the Makefile.

Also I removed the reset target as it seems obsolete.

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.