From ed70daf524ff2dd8ebb18c80ad683d519a0b6762 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Wed, 5 Sep 2012 07:00:00 -0400 Subject: [PATCH] Split lxcsu kernel module into two parts - one each for the pid and mnt namespaces --- Makefile | 2 +- lxcsu.c | 2 ++ lxcsu.conf | 1 - lxcsu.spec | 11 +++++++---- mntsu.conf | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 lxcsu.conf create mode 100644 mntsu.conf diff --git a/Makefile b/Makefile index da0a6bb..cbe3c87 100644 --- 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 --- 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 index dfc0ca0..0000000 --- a/lxcsu.conf +++ /dev/null @@ -1 +0,0 @@ -lxcsu diff --git a/lxcsu.spec b/lxcsu.spec index ae84058..9cd7e71 100644 --- a/lxcsu.spec +++ b/lxcsu.spec @@ -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 index 0000000..2a866e5 --- /dev/null +++ b/mntsu.conf @@ -0,0 +1 @@ +mntsu -- 2.43.0