Blame SOURCES/selinux-sandbox-fedora.patch

10f7fd
diff --git selinux-sandbox-2.8/Makefile selinux-sandbox-2.8/Makefile
10f7fd
index 49c1d3f..9e45329 100644
10f7fd
--- selinux-sandbox-2.8/Makefile
10f7fd
+++ selinux-sandbox-2.8/Makefile
10f7fd
@@ -12,6 +12,7 @@ override LDLIBS += -lselinux -lcap-ng
10f7fd
 SEUNSHARE_OBJS = seunshare.o
10f7fd
 
10f7fd
 all: sandbox seunshare sandboxX.sh start
10f7fd
+	(cd po && $(MAKE) $@)
10f7fd
 
10f7fd
 seunshare: $(SEUNSHARE_OBJS)
10f7fd
 
10f7fd
@@ -30,6 +31,7 @@ install: all
10f7fd
 	install -m 755 start $(DESTDIR)$(SHAREDIR)
10f7fd
 	-mkdir -p $(DESTDIR)$(SYSCONFDIR)
10f7fd
 	install -m 644 sandbox.conf $(DESTDIR)$(SYSCONFDIR)/sandbox
10f7fd
+	(cd po && $(MAKE) $@)
10f7fd
 
10f7fd
 test:
10f7fd
 	@$(PYTHON) test_sandbox.py -v
10f7fd
diff --git selinux-sandbox-2.8/po/Makefile selinux-sandbox-2.8/po/Makefile
10f7fd
new file mode 100644
10f7fd
index 0000000..0556bbe
10f7fd
--- /dev/null
10f7fd
+++ selinux-sandbox-2.8/po/Makefile
10f7fd
@@ -0,0 +1,82 @@
10f7fd
+#
10f7fd
+# Makefile for the PO files (translation) catalog
10f7fd
+#
10f7fd
+
10f7fd
+PREFIX ?= /usr
10f7fd
+
10f7fd
+# What is this package?
10f7fd
+NLSPACKAGE	= sandbox
10f7fd
+POTFILE		= $(NLSPACKAGE).pot
10f7fd
+INSTALL		= /usr/bin/install -c -p
10f7fd
+INSTALL_DATA	= $(INSTALL) -m 644
10f7fd
+INSTALL_DIR	= /usr/bin/install -d
10f7fd
+
10f7fd
+# destination directory
10f7fd
+INSTALL_NLS_DIR = $(PREFIX)/share/locale
10f7fd
+
10f7fd
+# PO catalog handling
10f7fd
+MSGMERGE	= msgmerge
10f7fd
+MSGMERGE_FLAGS	= -q
10f7fd
+XGETTEXT	= xgettext -L Python --default-domain=$(NLSPACKAGE)
10f7fd
+MSGFMT		= msgfmt
10f7fd
+
10f7fd
+# All possible linguas
10f7fd
+PO_LINGUAS := $(sort $(patsubst %.po,%,$(wildcard *.po)))
10f7fd
+
10f7fd
+# Only the files matching what the user has set in LINGUAS
10f7fd
+USER_LINGUAS := $(filter $(patsubst %,%%,$(LINGUAS)),$(PO_LINGUAS))
10f7fd
+
10f7fd
+# if no valid LINGUAS, build all languages
10f7fd
+USE_LINGUAS := $(if $(USER_LINGUAS),$(USER_LINGUAS),$(PO_LINGUAS))
10f7fd
+
10f7fd
+POFILES		= $(patsubst %,%.po,$(USE_LINGUAS))
10f7fd
+MOFILES		= $(patsubst %.po,%.mo,$(POFILES))
10f7fd
+POTFILES  = $(shell cat POTFILES)
10f7fd
+
10f7fd
+#default:: clean
10f7fd
+
10f7fd
+all:: $(POTFILE) $(MOFILES)
10f7fd
+
10f7fd
+$(POTFILE): $(POTFILES)
10f7fd
+	$(XGETTEXT) --keyword=_ --keyword=N_ $(POTFILES)
10f7fd
+	@if cmp -s $(NLSPACKAGE).po $(POTFILE); then \
10f7fd
+	    rm -f $(NLSPACKAGE).po; \
10f7fd
+	else \
10f7fd
+	    mv -f $(NLSPACKAGE).po $(POTFILE); \
10f7fd
+	fi; \
10f7fd
+
10f7fd
+
10f7fd
+refresh-po: Makefile
10f7fd
+	for cat in $(POFILES); do \
10f7fd
+		lang=`basename $$cat .po`; \
10f7fd
+		if $(MSGMERGE) $(MSGMERGE_FLAGS) $$lang.po $(POTFILE) > $$lang.pot ; then \
10f7fd
+			mv -f $$lang.pot $$lang.po ; \
10f7fd
+			echo "$(MSGMERGE) of $$lang succeeded" ; \
10f7fd
+		else \
10f7fd
+			echo "$(MSGMERGE) of $$lang failed" ; \
10f7fd
+			rm -f $$lang.pot ; \
10f7fd
+		fi \
10f7fd
+	done
10f7fd
+
10f7fd
+clean:
10f7fd
+	@rm -fv *mo *~ .depend
10f7fd
+	@rm -rf tmp
10f7fd
+
10f7fd
+install: $(MOFILES)
10f7fd
+	@for n in $(MOFILES); do \
10f7fd
+	    l=`basename $$n .mo`; \
10f7fd
+	    $(INSTALL_DIR) $(DESTDIR)$(INSTALL_NLS_DIR)/$$l/LC_MESSAGES; \
10f7fd
+	    $(INSTALL_DATA) --verbose $$n $(DESTDIR)$(INSTALL_NLS_DIR)/$$l/LC_MESSAGES/selinux-$(NLSPACKAGE).mo; \
10f7fd
+	done
10f7fd
+
10f7fd
+%.mo: %.po
10f7fd
+	$(MSGFMT) -o $@ $<
10f7fd
+report:
10f7fd
+	@for cat in $(wildcard *.po); do \
10f7fd
+                echo -n "$$cat: "; \
10f7fd
+                msgfmt -v --statistics -o /dev/null $$cat; \
10f7fd
+        done
10f7fd
+
10f7fd
+.PHONY: missing depend
10f7fd
+
10f7fd
+relabel:
10f7fd
diff --git selinux-sandbox-2.8/po/POTFILES selinux-sandbox-2.8/po/POTFILES
10f7fd
new file mode 100644
10f7fd
index 0000000..deff3f2
10f7fd
--- /dev/null
10f7fd
+++ selinux-sandbox-2.8/po/POTFILES
10f7fd
@@ -0,0 +1 @@
10f7fd
+../sandbox
10f7fd
diff --git selinux-sandbox-2.8/sandbox selinux-sandbox-2.8/sandbox
10f7fd
index c07a1d8..948496d 100644
10f7fd
--- selinux-sandbox-2.8/sandbox
10f7fd
+++ selinux-sandbox-2.8/sandbox
10f7fd
@@ -37,7 +37,7 @@ import sepolicy
10f7fd
 
10f7fd
 SEUNSHARE = "/usr/sbin/seunshare"
10f7fd
 SANDBOXSH = "/usr/share/sandbox/sandboxX.sh"
10f7fd
-PROGNAME = "policycoreutils"
10f7fd
+PROGNAME = "selinux-sandbox"
10f7fd
 try:
10f7fd
     import gettext
10f7fd
     kwargs = {}
10f7fd
@@ -268,7 +268,7 @@ class Sandbox:
10f7fd
             copyfile(f, "/tmp", self.__tmpdir)
10f7fd
             copyfile(f, "/var/tmp", self.__tmpdir)
10f7fd
 
10f7fd
-    def __setup_sandboxrc(self, wm="/usr/bin/openbox"):
10f7fd
+    def __setup_sandboxrc(self, wm="/usr/bin/matchbox-window-manager"):
10f7fd
         execfile = self.__homedir + "/.sandboxrc"
10f7fd
         fd = open(execfile, "w+")
10f7fd
         if self.__options.session:
10f7fd
@@ -362,7 +362,7 @@ sandbox [-h] [-l level ] [-[X|M] [-H homedir] [-T tempdir]] [-I includefile ] [-
10f7fd
 
10f7fd
         parser.add_option("-W", "--windowmanager", dest="wm",
10f7fd
                           type="string",
10f7fd
-                          default="/usr/bin/openbox",
10f7fd
+                          default="/usr/bin/matchbox-window-manager",
10f7fd
                           help=_("alternate window manager"))
10f7fd
 
10f7fd
         parser.add_option("-l", "--level", dest="level",
10f7fd
diff --git selinux-sandbox-2.8/sandbox.8 selinux-sandbox-2.8/sandbox.8
10f7fd
index d83fee7..90ef495 100644
10f7fd
--- selinux-sandbox-2.8/sandbox.8
10f7fd
+++ selinux-sandbox-2.8/sandbox.8
10f7fd
@@ -77,7 +77,7 @@ Specifies the windowsize when creating an X based Sandbox. The default windowsiz
10f7fd
 \fB\-W\fR \fB\-\-windowmanager\fR
10f7fd
 Select alternative window manager to run within 
10f7fd
 .B sandbox \-X.
10f7fd
-Default to /usr/bin/openbox.
10f7fd
+Default to /usr/bin/matchbox-window-manager.
10f7fd
 .TP
10f7fd
 \fB\-X\fR 
10f7fd
 Create an X based Sandbox for gui apps, temporary files for
10f7fd
diff --git selinux-sandbox-2.8/sandboxX.sh selinux-sandbox-2.8/sandboxX.sh
10f7fd
index eaa500d..c211ebc 100644
10f7fd
--- selinux-sandbox-2.8/sandboxX.sh
10f7fd
+++ selinux-sandbox-2.8/sandboxX.sh
10f7fd
@@ -6,21 +6,7 @@ export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8
10f7fd
 [ -z $2 ] && export DPI="96" || export DPI="$2"
10f7fd
 trap "exit 0" HUP
10f7fd
 
10f7fd
-mkdir -p ~/.config/openbox
10f7fd
-cat > ~/.config/openbox/rc.xml << EOF
10f7fd
-
10f7fd
-		xmlns:xi="http://www.w3.org/2001/XInclude">
10f7fd
-<applications>
10f7fd
-  <application class="*">
10f7fd
-    <decor>no</decor>
10f7fd
-    <desktop>all</desktop>
10f7fd
-    <maximized>yes</maximized>
10f7fd
-  </application>
10f7fd
-</applications>
10f7fd
-</openbox_config>
10f7fd
-EOF
10f7fd
-
10f7fd
-(/usr/bin/Xephyr -resizeable -title "$TITLE" -terminate -screen $SCREENSIZE -dpi $DPI -nolisten tcp -displayfd 5 5>&1 2>/dev/null) | while read D; do
10f7fd
+(/usr/bin/Xephyr -resizeable -title "$TITLE" -terminate -reset -screen $SCREENSIZE -dpi $DPI -nolisten tcp -displayfd 5 5>&1 2>/dev/null) | while read D; do
10f7fd
     export DISPLAY=:$D
10f7fd
     cat > ~/seremote << __EOF
10f7fd
 #!/bin/sh