Split lxcsu kernel module into two parts - one each for the pid and mnt namespaces
Sapan Bhatia [Wed, 5 Sep 2012 11:00:00 +0000 (07:00 -0400)]
Makefile
lxcsu.c
lxcsu.conf [deleted file]
lxcsu.spec
mntsu.conf [new file with mode: 0644]

index da0a6bb..cbe3c87 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-obj-m += lxcsu.o
+obj-m += mntsu.o pidsu.o
 
 all:
        make -C /lib/modules/3.4.9-1.fc16.x86_64/build M=$(PWD) modules
diff --git a/lxcsu.c b/lxcsu.c
index fb0a34b..02d44d9 100644 (file)
--- a/lxcsu.c
+++ b/lxcsu.c
@@ -171,6 +171,8 @@ int lxcsu_write(struct file *file, const char *buffer, unsigned long count, void
 
        return count;
 }
+
+
 static int __init lxcsu_init(void)
 {
                int ret=0;
diff --git a/lxcsu.conf b/lxcsu.conf
deleted file mode 100644 (file)
index dfc0ca0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-lxcsu
index ae84058..9cd7e71 100644 (file)
@@ -1,5 +1,5 @@
 %define name lxcsu
-%define version 0.1
+%define version 0.2
 %define taglevel 1
 
 ### legacy from locally-built kernels, used to define these
@@ -49,16 +49,19 @@ ACLs for protecting entries in the proc filesystem.
 make -C %{kernelpath} V=1 M=$(pwd) modules
 
 %install
-install -D -m 755 lxcsu.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/kernel/net/lxcsu/lxcsu.ko
+install -D -m 755 mntsu.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/kernel/net/mntsu/mntsu.ko
+install -D -m 755 pidsu.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/kernel/net/pidsu/pidsu.ko
 mkdir -p $RPM_BUILD_ROOT/etc/modules-load.d
-install -m 644 lxcsu.conf $RPM_BUILD_ROOT/etc/modules-load.d/lxcsu.conf
+install -m 644 mntsu.conf $RPM_BUILD_ROOT/etc/modules-load.d/mntsu.conf
+install -m 644 pidsu.conf $RPM_BUILD_ROOT/etc/modules-load.d/pidsu.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 /lib/modules/%{kernel_id}
-/etc/modules-load.d/lxcsu.conf
+/etc/modules-load.d/mntsu.conf
+/etc/modules-load.d/pidsu.conf
 
 %post
 /sbin/depmod -a
diff --git a/mntsu.conf b/mntsu.conf
new file mode 100644 (file)
index 0000000..2a866e5
--- /dev/null
@@ -0,0 +1 @@
+mntsu