/[vps]/vserver-sources/2.0.2_rc14/4412_vs2.0.2-rc14-cloop-feat01.patch
Gentoo

Contents of /vserver-sources/2.0.2_rc14/4412_vs2.0.2-rc14-cloop-feat01.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 296 - (show annotations) (download)
Fri Mar 24 11:02:22 2006 UTC (8 years, 4 months ago) by phreak
File size: 1498 byte(s)
_rc14 including the cloop patch, adding support for VXC_CRYPTO_LOOP
1 Index: vserver-sources-2.0.2_2.6.16/drivers/block/loop.c
2 ===================================================================
3 --- vserver-sources-2.0.2_2.6.16.orig/drivers/block/loop.c
4 +++ vserver-sources-2.0.2_2.6.16/drivers/block/loop.c
5 @@ -943,7 +943,7 @@ loop_set_status(struct loop_device *lo,
6 struct loop_func_table *xfer;
7
8 if (lo->lo_encrypt_key_size && lo->lo_key_owner != current->uid &&
9 - !capable(CAP_SYS_ADMIN))
10 + !capable(CAP_SYS_ADMIN) && !vx_ccaps(VXC_CRYPTO_LOOP))
11 return -EPERM;
12 if (lo->lo_state != Lo_bound)
13 return -ENXIO;
14 @@ -1023,7 +1023,8 @@ loop_get_status(struct loop_device *lo,
15 memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE);
16 info->lo_encrypt_type =
17 lo->lo_encryption ? lo->lo_encryption->number : 0;
18 - if (lo->lo_encrypt_key_size && capable(CAP_SYS_ADMIN)) {
19 + if (lo->lo_encrypt_key_size &&
20 + (capable(CAP_SYS_ADMIN) || vx_ccaps(VXC_CRYPTO_LOOP))) {
21 info->lo_encrypt_key_size = lo->lo_encrypt_key_size;
22 memcpy(info->lo_encrypt_key, lo->lo_encrypt_key,
23 lo->lo_encrypt_key_size);
24 Index: vserver-sources-2.0.2_2.6.16/include/linux/vserver/context.h
25 ===================================================================
26 --- vserver-sources-2.0.2_2.6.16.orig/include/linux/vserver/context.h
27 +++ vserver-sources-2.0.2_2.6.16/include/linux/vserver/context.h
28 @@ -71,6 +71,7 @@
29 #define VXC_BINARY_MOUNT 0x00040000
30
31 #define VXC_QUOTA_CTL 0x00100000
32 +#define VXC_CRYPTO_LOOP 0x00200000
33
34
35 /* context state changes */

  ViewVC Help
Powered by ViewVC 1.1.20