[SM-Commit] GIT changes to master grimoire by David Brown (811e2391c9f5e464a4bfd8565fd4ad414dc1c1a5)

David Brown scm at sourcemage.org
Fri Sep 14 21:44:21 EDT 2007


GIT changes to master grimoire by David Brown <dmlb2000 at gmail.com>:

 ChangeLog                                    |    3 
 disk/fuse-python/BUILD                       |    2 
 disk/fuse-python/DETAILS                     |   10 +-
 disk/fuse-python/HISTORY                     |    5 +
 disk/fuse-python/INSTALL                     |    1 
 perl-cpan/perl-fuse/DETAILS                  |    4 
 perl-cpan/perl-fuse/HISTORY                  |    3 
 security/seedit/DETAILS                      |   13 +++
 security/seedit/HISTORY                      |    2 
 smgl/simpleinit-msb/HISTORY                  |    4 
 smgl/simpleinit-msb/PRE_BUILD                |    1 
 smgl/simpleinit-msb/simpleinit-selinux.patch |  109 +++++++++++++++++++++++++++
 12 files changed, 148 insertions(+), 9 deletions(-)

New commits:
commit 811e2391c9f5e464a4bfd8565fd4ad414dc1c1a5
Author: David Brown <dmlb2000 at gmail.com>
Commit: David Brown <dmlb2000 at gmail.com>

    seedit new spell for editing selinux policies

commit 112a4f581a4b6318dda6276af7407458fdd2c0ff
Author: David Brown <dmlb2000 at gmail.com>
Commit: David Brown <dmlb2000 at gmail.com>

    fuse-python fixed hash sum for source

commit 9c8d8d79ad6d58f43cbe8bab94dae1f835156abf
Author: David Brown <dmlb2000 at gmail.com>
Commit: David Brown <dmlb2000 at gmail.com>

    fuse-python updated to version 0.2

commit 01ffa5f84876b30db95e3b0492056282facfae6b
Author: David Brown <dmlb2000 at gmail.com>
Commit: David Brown <dmlb2000 at gmail.com>

    perl-fuse updated bindings for fuse in perl

commit 14b2e3ab36a71ecb22ab30f3b5025c1817aa9218
Author: David Brown <dmlb2000 at gmail.com>
Commit: David Brown <dmlb2000 at gmail.com>

    simpleinit-msb added selinux patch for loading selinux policies

diff --git a/ChangeLog b/ChangeLog
index 630cbb5..5712ccf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2007-09-14 David Brown <dmlb2000 at gmail.com>
+	* security/seedit: added new selinux policy editor spell
+
 2007-09-13 David Brown <dmlb2000 at gmail.com>
 	* security/audit: added new linux security auditing system
 
diff --git a/disk/fuse-python/BUILD b/disk/fuse-python/BUILD
index 27ba77d..3d7f60b 100755
--- a/disk/fuse-python/BUILD
+++ b/disk/fuse-python/BUILD
@@ -1 +1 @@
-true
+python setup.py build
diff --git a/disk/fuse-python/DETAILS b/disk/fuse-python/DETAILS
index 91eb77f..866f4c4 100755
--- a/disk/fuse-python/DETAILS
+++ b/disk/fuse-python/DETAILS
@@ -1,10 +1,10 @@
            SPELL=fuse-python
-         VERSION=0.1
-          SOURCE=$SPELL.tar.gz
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL
-   SOURCE_URL[0]=http://richard.jones.name/google-hacks/gmail-filesystem/$SOURCE
+         VERSION=0.2
+          SOURCE=$SPELL-$VERSION.tar.gz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+   SOURCE_URL[0]=$SOURCEFORGE_URL/fuse/$SPELL-$VERSION.tar.gz
         WEB_SITE=http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem.html
-          MD5[0]=dd533399f35621c625ad4b1eb1d297de
+     SOURCE_HASH=sha512:c8b44c0cd98dfb3730f067dc3fae790a6b61f0b745eca2a25defa456bdd75d845ba1a66c3e3ad72bfdf012ff68c1186db196e6bb6023a9b99b239fda9589786f
          LICENSE=GPL
         KEYWORDS="disk python"
            SHORT="Python bindings for fuse"
diff --git a/disk/fuse-python/HISTORY b/disk/fuse-python/HISTORY
index 60013e4..e6e3e26 100644
--- a/disk/fuse-python/HISTORY
+++ b/disk/fuse-python/HISTORY
@@ -1,3 +1,8 @@
+2007-09-14 David Brown <dmlb2000 at gmail.com>
+	* DETAILS: updated to 0.2 and to sf.net url and fixed hash
+	* BUILD: build here
+	* INSTALL: install here not 'build and install'
+
 2006-03-12 Karsten Behrmann <BearPerson at sourcemage.org>
 	* DETAILS: (automated) Add KEYWORDS
 
diff --git a/disk/fuse-python/INSTALL b/disk/fuse-python/INSTALL
index 8087cd3..762d43b 100755
--- a/disk/fuse-python/INSTALL
+++ b/disk/fuse-python/INSTALL
@@ -1,2 +1 @@
-python setup.py build        &&
 python setup.py install
diff --git a/perl-cpan/perl-fuse/DETAILS b/perl-cpan/perl-fuse/DETAILS
index eefce1e..77f6f20 100755
--- a/perl-cpan/perl-fuse/DETAILS
+++ b/perl-cpan/perl-fuse/DETAILS
@@ -1,6 +1,6 @@
            SPELL=perl-fuse
-         VERSION=0.07
-     SOURCE_HASH=sha512:6b33b2af352f1e140791c967ad674f7caba48e425b41515cb29ad5c6416c90fa96b830c7de463106dcccc7ece7c8bfa1e3ea2d06446e5855a5e79c07e8029ff2
+         VERSION=0.09_1
+     SOURCE_HASH=sha512:2f8f6cfaf4b4fb0ada56247f41c951a7c82e98b204ad6861cdeb55b69ad291fc34f4bd8442deddd026414fb3a080f51d81ff5e3a8916256239545b9e433b570c
 # eventually the BUILD file can be removed for this var
 #       BUILD_CMD=default_build_perl
           SOURCE=Fuse-$VERSION.tar.gz
diff --git a/perl-cpan/perl-fuse/HISTORY b/perl-cpan/perl-fuse/HISTORY
index 5f4df21..cdb8fc8 100644
--- a/perl-cpan/perl-fuse/HISTORY
+++ b/perl-cpan/perl-fuse/HISTORY
@@ -1,3 +1,6 @@
+2007-09-14 David Brown <dmlb2000 at gmail.com>
+	* DETAILS: version bump 0.09_1
+
 2006-09-21 Juuso Alasuutari <iuso at sourcemage.org>
 	* DETAILS: [automated] Removed BUILD_API=2.
 
diff --git a/security/seedit/DETAILS b/security/seedit/DETAILS
new file mode 100755
index 0000000..183d305
--- /dev/null
+++ b/security/seedit/DETAILS
@@ -0,0 +1,13 @@
+           SPELL=seedit
+         VERSION=2.1.2
+          SOURCE=$SPELL-$VERSION.tar.gz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+   SOURCE_URL[0]=$SOURCEFORGE_URL/$SPELL/$SPELL-$VERSION.tar.gz
+        WEB_SITE=http://seedit.sf.net/
+     SOURCE_HASH=sha512:cc0af4bce6aadeab631f1c1d44f48a23ffe7a92e596d5942d1dcead05d762163c141d5ec1fb766d33dbe374a6dfd559bbd33b17e698e503a15e7d826d20497ed 
+         LICENSE=GPL
+        KEYWORDS="selinux security editor"
+           SHORT="selinux policy editor"
+cat << EOF
+selinux policy editor developed by Hitachi Software.
+EOF
diff --git a/security/seedit/HISTORY b/security/seedit/HISTORY
new file mode 100644
index 0000000..e6ab64d
--- /dev/null
+++ b/security/seedit/HISTORY
@@ -0,0 +1,2 @@
+2007-09-14 David Brown <dmlb2000 at gmail.com>
+	* ALL: created spell
diff --git a/smgl/simpleinit-msb/HISTORY b/smgl/simpleinit-msb/HISTORY
index 3ad42cd..d5593dc 100644
--- a/smgl/simpleinit-msb/HISTORY
+++ b/smgl/simpleinit-msb/HISTORY
@@ -1,3 +1,7 @@
+2007-09-14 David Brown <dmlb2000 at gmail.com>
+	* PRE_BUILD: added selinux patch for loading policies
+	* simpleinit-selinux.patch: added
+
 2007-02-28 Arwed v. Merkatz <v.merkatz at gmx.net>
 	* PRE_BUILD, simpleinit-output-on-shutdown.patch:
 	  patch to fix bug 13114, simpleinit now displaying script output
diff --git a/smgl/simpleinit-msb/PRE_BUILD b/smgl/simpleinit-msb/PRE_BUILD
index 42b42fa..2a22375 100755
--- a/smgl/simpleinit-msb/PRE_BUILD
+++ b/smgl/simpleinit-msb/PRE_BUILD
@@ -6,6 +6,7 @@ patch  -p1  <  $SCRIPT_DIRECTORY/simpleinit-msb-crypt.diff  &&
 patch -p0 < $SPELL_DIRECTORY/simpleinit.nonls.diff          &&
 patch -p0 < $SPELL_DIRECTORY/shutdown.nonls.diff            &&
 patch -p0 < $SPELL_DIRECTORY/simpleinit-output-on-shutdown.patch  &&
+patch -p1 < $SPELL_DIRECTORY/simpleinit-selinux.patch &&
 if [[ $SIMPLEINIT_STATIC == y ]]; then
 sedit 's#shutdown: shutdown.o $(LIB)/my_reboot.o $(LIB)/xstrncpy.o#shutdown: shutdown.o $(LIB)/my_reboot.o $(LIB)/xstrncpy.o\n\t$(CC) $(LDFLAGS) -o $@ $^#' login-utils/Makefile  &&
 sedit 's:$(CC) $(LDFLAGS):$(CC) -static $(LDFLAGS):g' login-utils/Makefile
diff --git a/smgl/simpleinit-msb/simpleinit-selinux.patch b/smgl/simpleinit-msb/simpleinit-selinux.patch
new file mode 100644
index 0000000..09f5194
--- /dev/null
+++ b/smgl/simpleinit-msb/simpleinit-selinux.patch
@@ -0,0 +1,109 @@
+--- a/login-utils/simpleinit.c	2007-09-14 23:44:34.726342737 +0000
++++ b/login-utils/simpleinit.c	2007-09-14 23:44:18.000000000 +0000
+@@ -218,6 +218,8 @@
+ #include <sys/ioctl.h>
+ #include <dirent.h>
+ #include <termios.h>
++#include <sys/mount.h>
++#include <sys/mman.h>
+ #include <utmp.h>
+ #include <sched.h>
+ #include <time.h>
+@@ -271,6 +273,7 @@
+ struct initline inittab[NUMCMD];
+ int numcmd;
+ int stopped = 0;	/* are we stopped */
++int no_selinux = 1;     /* disabled by default */
+ static char boot_prog[PATH_SIZE] = _PATH_RC;
+ static char init_root[PATH_SIZE] = "\0";
+ static char script_prefix[PATH_SIZE] = "\0";
+@@ -332,6 +335,8 @@
+ pid_t mywait (int *status);
+ int run_command (const char *file, const char *name, pid_t pid,struct script_struct* waiting_script);
+ void ystrncat(char* dest,const char* src,ssize_t n);
++int security_load_policy(void *data, size_t len);
++int load_policy(void);
+ 
+ /* like strcat, but dest will never contain more than n characters after
+ the call (i.e. a 0-terminator will be found among the first n characters,
+@@ -441,7 +446,14 @@
+ 	}
+ 
+   open_initctl_fifo();
+-	
++
++	if (!no_selinux) {
++		if (load_policy() != 0) {
++			err( _("Failed to load SELinux policy.\n"));
++			exit(1);
++		}
++	}
++
+ 	if (userspace){
+ 	  pid_t mypid=getpid();
+ 	  int fd;
+@@ -538,6 +550,64 @@
+ 
+ #define MAXTRIES 3 /* number of tries allowed when giving the password */
+ 
++int security_load_policy(void *data, size_t len) {
++	int fd, ret;
++	fd = open("/selinux/load", O_RDWR);
++	if (fd < 0)
++		return -1;
++	ret = write(fd, data, len);
++	close(fd);
++	if (ret < 0)
++		return -1;
++	return 0;
++}
++
++int load_policy(void) {
++	int ret;
++	int fd;
++	void *map;
++	struct stat sb;
++	ret = mount("none", "/selinux", "selinuxfs", 0, 0);
++	if (ret < 0) {
++		char txt[256];
++		sprintf(txt, "SELinux: failed to mount /selinux (errno=%d)\n", errno);
++		err( _(txt));
++		return ret;
++	}
++	
++	fd = open("/etc/selinux/policy.bin", O_RDONLY);
++	if (fd < 0) {
++		char txt[256];
++		sprintf(txt, "SELinux: couldn't find /etc/selinux/policy.bin (errno=%d)\n", errno);
++		err( _(txt));
++		return -1;
++	}
++	
++	ret = fstat(fd, &sb);
++	if (ret < 0) {
++		char txt[256];
++		sprintf(txt, "Can't stat /etc/selinux/policy.bin (errno=%d)\n", errno);
++		err( _(txt));
++		close(fd);
++		return ret;
++	}
++	map = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
++	if (map == MAP_FAILED) {
++		char txt[256];
++		sprintf(txt, "Can't map /etc/selinux/policy.bin (errno=%d\n", errno);
++		err( _(txt));
++		close(fd);
++		return -1;
++	}
++	ret = security_load_policy(map, sb.st_size);
++	if (ret < 0) {
++		err( _("security_load_policy failed\n"));
++	}
++	close(fd);
++	return ret;
++}
++
++
+ /*
+  * run boot script(s). The environment is passed to the script(s), so the RC
+  * environment variable can be used to decide what to do.



More information about the SM-Commit mailing list