file_contexts tiny patch
Subsystems (2)
I've attached a tiny patch to add support for policy/file_contexts/misc .
This directory is to be used for .fc files that don't have a matching .te file. One thing I have used this for is a .tar.gz archive of GCC for cross-compiling for ARM, so I have policy/file_contexts/misc/arm-gcc.fc which has the appropriate labelling for /opt/arm.
I think that this is generally useful.
I haven't moves types.fc yet because the misc directory is processed in alphabetical order and types.fc needs to be first.
Signature · 4 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
usr/share/selinux/policy/current/Makefile renamed from usr/share/selinux/policy/default/Makefile +2 -2
@@ -35,7 +35,7 @@ POLICYFILES += tmp/constraints-contexts.m4 FC = file_contexts/file_contexts -FCFILES=file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) +FCFILES=file_contexts/types.fc $(wildcard file_contexts/misc/*.fc) $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) install: $(LOADPATH)
@@ -109,7 +109,7 @@ reset: $(FC) $(SETFILES) $(SETFILES) -R $(FC) `mount | awk '/(ext[23]|reiserfs|jfs|jffs2)/{print $$3}'` -$(FC): $(FCFILES) file_contexts/program +$(FC): $(FCFILES) file_contexts/program file_contexts/misc cat $(FCFILES) > $@ clean:
A small addition to Makefile
Can these changes be ported to the tree.
The changes to, the Makefile at selinux directory are :
1) clean 2) mrproper and 3) distclean
The diff is :
[root@vriksha selinux]# diff Makefile Makefile.old 43,65d42
<
< clean:
< @echo "Cleaning the SELinux kernel." < cd ../lsm$(LSMVER) && make clean < cd module && make clean < cd tools && make clean < cd policy && make clean < cd libsecure && make clean < cd selopt && make clean < cd setfiles && make clean < cd policy && make clean < @echo "Done." < < mrproper:clean < @echo "mrproper of SELinux kernel." < cd ../lsm$(LSMVER) && make mrproper < @echo "Done." < < distclean:mrproper < @echo "distclean of SELinux kernel" < cd ../lsm$(LSMVER) && make distclean < cd selopt && make distclean < @echo "Done."
=====
Akshay R Gangam
"A mathematician is a device for turning coffee into theorems."
- Paul Erdos
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com