diff options
Diffstat (limited to 'main/iscsitarget-grsec')
-rw-r--r-- | main/iscsitarget-grsec/APKBUILD | 17 | ||||
-rw-r--r-- | main/iscsitarget-grsec/iscsitarget-2.6.38.patch | 32 |
2 files changed, 42 insertions, 7 deletions
diff --git a/main/iscsitarget-grsec/APKBUILD b/main/iscsitarget-grsec/APKBUILD index d03b8be3c..1dc1be2be 100644 --- a/main/iscsitarget-grsec/APKBUILD +++ b/main/iscsitarget-grsec/APKBUILD @@ -15,7 +15,7 @@ _iscsiver=1.4.20.2 pkgname=${_realname}-${_flavor} pkgver=$_kver -_mypkgrel=2 +_mypkgrel=0 pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgdesc="$_flavor kernel modules for iscsitarget $_iscsiver" url="http://iscsitarget.sourceforge.net/" @@ -27,15 +27,17 @@ makedepends="linux-${_flavor}-dev=${_kernelver}" subpackages= source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz iscsitarget-2.6.36.patch - iscsitarget-2.6.37.patch" + iscsitarget-2.6.37.patch + iscsitarget-2.6.38.patch + " _ksrc=/usr/src/linux-headers-${_abi_release} prepare() { cd "$srcdir"/$_realname-$_iscsiver - for i in ../*.patch; do - [ -r "$i" ] || continue - msg "Applying $i" - patch -p1 < $i || return 1 + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac done } @@ -52,4 +54,5 @@ package() { md5sums="2f23c0bfe124d79f5c20e34ef2aaff82 iscsitarget-1.4.20.2.tar.gz 19f311cf41aff5f13b371ff38aa543df iscsitarget-2.6.36.patch -f29a9701fd2ba3e6e3c0c411ff0e6327 iscsitarget-2.6.37.patch" +f29a9701fd2ba3e6e3c0c411ff0e6327 iscsitarget-2.6.37.patch +26c42eeb23f5afd5f62dcd5aa3a639bd iscsitarget-2.6.38.patch" diff --git a/main/iscsitarget-grsec/iscsitarget-2.6.38.patch b/main/iscsitarget-grsec/iscsitarget-2.6.38.patch new file mode 100644 index 000000000..90a5e5644 --- /dev/null +++ b/main/iscsitarget-grsec/iscsitarget-2.6.38.patch @@ -0,0 +1,32 @@ +--- ./kernel/block-io.c.orig ++++ ./kernel/block-io.c +@@ -155,14 +155,14 @@ + { + struct blockio_data *bio_data = volume->private; + struct block_device *bdev; +- int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); ++ int flags = FMODE_EXCL | FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); + int err = 0; + + bio_data->path = kstrdup(path, GFP_KERNEL); + if (!bio_data->path) + return -ENOMEM; + +- bdev = open_bdev_exclusive(path, flags, THIS_MODULE); ++ bdev = blkdev_get_by_path(path, flags, THIS_MODULE); + if (IS_ERR(bdev)) { + err = PTR_ERR(bdev); + eprintk("Can't open device %s, error %d\n", path, err); +@@ -250,10 +250,10 @@ + blockio_detach(struct iet_volume *volume) + { + struct blockio_data *bio_data = volume->private; +- int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); ++ int flags = FMODE_EXCL | FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); + + if (bio_data->bdev) +- close_bdev_exclusive(bio_data->bdev, flags); ++ blkdev_put(bio_data->bdev, flags); + kfree(bio_data->path); + + kfree(volume->private); |