Skip to contentSkip to conversation

sereference: permit reiserfs

PATCH In review Serge E. Hallyn 2 participants 3 messages Dec 21, 2005 – Dec 22, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sereference: permit reiserfs

Oops, I forgot about this one...

Is there still a good reason to not support labeling reiserfs? If not, the following trivial patch was needed for me to 'make relabel' out of the reference policy.

thanks,
-serge

Rules.monolithic +4 -4
Index: refpolicy/Rules.monolithic
===================================================================
@@ -190,10 +190,10 @@ $(FCPATH): $(FC) $(LOADPATH) $(USERPATH)
 #
 # Filesystem labeling
 #
-FILESYSTEMS := `mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs| jfs).*rw/{print $$3}';`
+FILESYSTEMS := `mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs| jfs| reiserfs).*rw/{print $$3}';`
 
 checklabels: $(FCPATH) $(SETFILES)
-	@echo "Checking labels on filesystem types: ext2 ext3 xfs jfs"
+	@echo "Checking labels on filesystem types: ext2 ext3 xfs jfs reiser"
 	@if test -z "$(FILESYSTEMS)"; then \
 		echo "No filesystems with extended attributes found!" ;\
 		false ;\
@@ -201,7 +201,7 @@ checklabels: $(FCPATH) $(SETFILES)
 	$(QUIET) $(SETFILES) -v -n $(FCPATH) $(FILESYSTEMS)
 
 restorelabels: $(FCPATH) $(SETFILES)
-	@echo "Restoring labels on filesystem types: ext2 ext3 xfs jfs"
+	@echo "Restoring labels on filesystem types: ext2 ext3 xfs jfs reiser"
 	@if test -z "$(FILESYSTEMS)"; then \
 		echo "No filesystems with extended attributes found!" ;\
 		false ;\
@@ -209,7 +209,7 @@ restorelabels: $(FCPATH) $(SETFILES)
 	$(QUIET) $(SETFILES) -v $(FCPATH) $(FILESYSTEMS)
 
 relabel:  $(FCPATH) $(SETFILES)
-	@echo "Relabeling filesystem types: ext2 ext3 xfs jfs"
+	@echo "Relabeling filesystem types: ext2 ext3 xfs jfs reiser"
 	@if test -z "$(FILESYSTEMS)"; then \
 		echo "No filesystems with extended attributes found!" ;\
 		false ;\

--
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.

#1 lore raw
Quoted 5 lines · Serge E. Hallyn

Oops, I forgot about this one...

Is there still a good reason to not support labeling reiserfs? If not, the following trivial patch was needed for me to 'make relabel' out of the reference policy.

The status of reiserfs and SELinux has always been up in the air; SuSE did some work that went into 2.6.12 that allegedly solved the deadlock and permission problems, but I don't have any actual reports that anyone has ever been able to get reiserfs working properly in Fedora with SELinux enabled, and support for reiserfs would have been broken again by the removal of the post_create hooks in 2.6.14, see
http://marc.theaimsgroup.com/?l=selinux&m=112653995009765&w=2

Note that since I posted the above referenced message, the xfs maintainers have implemented a workaround in xfs that should go into 2.6.16. So only reiserfs will remain broken at that point (unless the reiserfs maintainers fix it).

Signature · 8 lines
Stephen Smalley
National Security Agency


--
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.
#2 lore raw

Hah! I should have remembered that... so that's likely why I can't log in using enforcing mode.

Thanks. Converting the fs is probably not possible right now, so I'll need a new plan...

-serge

Quoted 15 lines · Stephen Smalley
Quoted 5 lines · Serge E. Hallyn

Oops, I forgot about this one...

Is there still a good reason to not support labeling reiserfs? If not, the following trivial patch was needed for me to 'make relabel' out of the reference policy.

The status of reiserfs and SELinux has always been up in the air; SuSE did some work that went into 2.6.12 that allegedly solved the deadlock and permission problems, but I don't have any actual reports that anyone has ever been able to get reiserfs working properly in Fedora with SELinux enabled, and support for reiserfs would have been broken again by the removal of the post_create hooks in 2.6.14, see
http://marc.theaimsgroup.com/?l=selinux&m=112653995009765&w=2

Quoted 10 lines

Note that since I posted the above referenced message, the xfs maintainers have implemented a workaround in xfs that should go into 2.6.16. So only reiserfs will remain broken at that point (unless the reiserfs maintainers fix it).

Signature · 2 lines
Stephen Smalley
National Security Agency

--
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.