summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2003-12-04 22:40:43 +0000
committerLennart Poettering <lennart@poettering.net>2003-12-04 22:40:43 +0000
commit905060b43a294dd73cbcf19eb86b66240d6d0140 (patch)
tree6bd591c547cc4a78ac15962a16d09391679bf9e9 /kernel
parentf19907aec71491fa517cf01f36600277e7a1ad3c (diff)
May further patches from dbindner
git-svn-id: file:///home/lennart/svn/public/seppl/trunk@19 91a2fd9b-5dcb-0310-a70a-d71e310228e6
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile.in22
-rw-r--r--kernel/ipt_CRYPT.c10
-rw-r--r--kernel/ipt_DECRYPT.c12
-rw-r--r--kernel/seppl.c14
4 files changed, 53 insertions, 5 deletions
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 31f2f98..ee5a617 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -27,19 +27,33 @@ distdir = ../$(PACKAGE)-$(VERSION)
CFLAGS=-Wall -g -O2
KERNEL_CFLAGS= -I$(KERNELDIR)/include -DLINUX -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -DPACKAGE_BUGREPORT="\"@PACKAGE_BUGREPORT@\""
+include $(KERNELDIR)/.config
+
all: Makefile ipt_CRYPT.o ipt_DECRYPT.o seppl.o
Makefile: Makefile.in
cd .. && ./config.status kernel/Makefile
+
+ifdef CONFIG_MODVERSIONS
+seppl.o ipt_CRYPT.o ipt_DECRYPT.o: seppl.ver
+endif
+
+ifndef GENKSYMS
+GENKSYMS=genksyms
+endif
+
ipt_CRYPT.o: ipt_CRYPT.c
- $(CC) $(CFLAGS) -c $^ -o $@ $(KERNEL_CFLAGS)
+ $(CC) $(CFLAGS) -c $< -o $@ $(KERNEL_CFLAGS)
ipt_DECRYPT.o: ipt_DECRYPT.c
- $(CC) $(CFLAGS) -c $^ -o $@ $(KERNEL_CFLAGS)
+ $(CC) $(CFLAGS) -c $< -o $@ $(KERNEL_CFLAGS)
seppl.o: seppl.c
- $(CC) $(CFLAGS) -c $^ -o $@ $(KERNEL_CFLAGS)
+ $(CC) $(CFLAGS) -c $< -o $@ $(KERNEL_CFLAGS)
+
+seppl.ver: seppl.c
+ $(CC) $(CFLAGS) $(KERNEL_CFLAGS) -E -D__GENKSYMS__ $^ | $(GENKSYMS) -k `uname -r`> $@
install:
mkdir -p $(SEPPL_MODDIR)
@@ -56,6 +70,6 @@ maintainer-clean: clean
rm -f Makefile
clean:
- rm -f *.o
+ rm -f *.o *.var
.PHONY: all clean maintainer-clean mostlyclean distclean distdir install
diff --git a/kernel/ipt_CRYPT.c b/kernel/ipt_CRYPT.c
index 68b5784..5fdbc87 100644
--- a/kernel/ipt_CRYPT.c
+++ b/kernel/ipt_CRYPT.c
@@ -20,6 +20,16 @@
***/
#include <linux/config.h>
+
+#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
+ #define MODVERSIONS
+#endif
+
+#if defined(MODVERSIONS) && !defined(__GENKSYMS__)
+ #include <linux/modversions.h>
+ #include "seppl.ver"
+#endif
+
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
diff --git a/kernel/ipt_DECRYPT.c b/kernel/ipt_DECRYPT.c
index 75db2bd..ce59525 100644
--- a/kernel/ipt_DECRYPT.c
+++ b/kernel/ipt_DECRYPT.c
@@ -1,4 +1,4 @@
-/* $Id: newmail.c 31 2003-10-22 22:59:07Z lennart $ */
+/* $Id$ */
/***
This file is part of seppl
@@ -20,6 +20,16 @@
***/
#include <linux/config.h>
+
+#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
+ #define MODVERSIONS
+#endif
+
+#if defined(MODVERSIONS) && !defined(__GENKSYMS__)
+ #include <linux/modversions.h>
+ #include "seppl.ver"
+#endif
+
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
diff --git a/kernel/seppl.c b/kernel/seppl.c
index b15afbe..fd54b55 100644
--- a/kernel/seppl.c
+++ b/kernel/seppl.c
@@ -19,6 +19,17 @@
USA
***/
+#include <linux/config.h>
+
+#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
+ #define MODVERSIONS
+#endif
+
+#if defined(MODVERSIONS) && !defined(__GENKSYMS__)
+ #include <linux/modversions.h>
+ #include "seppl.ver"
+#endif
+
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/interrupt.h>
@@ -305,6 +316,9 @@ void seppl_clear_keyring(void) {
kfree(key->key);
kfree(key->iv);
+ crypto_free_tfm(key->tfm_ecb);
+ kfree(key->key_ecb);
+
k = key;
key = key->next;
kfree(k);