Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 261709
Collapse All | Expand All

(-)loop-AES-v3.2e/glue.c (-1 / +1 lines)
Lines 275-281 Link Here
275
    } un;
275
    } un;
276
276
277
#if LINUX_VERSION_CODE >= 0x20200
277
#if LINUX_VERSION_CODE >= 0x20200
278
    if(lo->lo_key_owner != current->uid && !capable(CAP_SYS_ADMIN))
278
    if(lo->lo_key_owner != current->cred->uid && !capable(CAP_SYS_ADMIN))
279
        return -EPERM;
279
        return -EPERM;
280
#endif
280
#endif
281
281
(-)loop-AES-v3.2e/loop.c-2.6.patched (-2 / +2 lines)
Lines 1654-1660 Link Here
1654
	int err;
1654
	int err;
1655
	struct loop_func_table *xfer = NULL;
1655
	struct loop_func_table *xfer = NULL;
1656
1656
1657
	if (lo->lo_encrypt_key_size && lo->lo_key_owner != current->uid &&
1657
	if (lo->lo_encrypt_key_size && lo->lo_key_owner != current->cred->uid &&
1658
	    !capable(CAP_SYS_ADMIN))
1658
	    !capable(CAP_SYS_ADMIN))
1659
		return -EPERM;
1659
		return -EPERM;
1660
	if ((unsigned int) info->lo_encrypt_key_size > LO_KEY_SIZE)
1660
	if ((unsigned int) info->lo_encrypt_key_size > LO_KEY_SIZE)
Lines 1710-1716 Link Here
1710
	if (info->lo_encrypt_key_size) {
1710
	if (info->lo_encrypt_key_size) {
1711
		memcpy(lo->lo_encrypt_key, info->lo_encrypt_key,
1711
		memcpy(lo->lo_encrypt_key, info->lo_encrypt_key,
1712
		       info->lo_encrypt_key_size);
1712
		       info->lo_encrypt_key_size);
1713
		lo->lo_key_owner = current->uid;
1713
		lo->lo_key_owner = current->cred->uid;
1714
	}	
1714
	}	
1715
1715
1716
	lo->lo_queue->make_request_fn = loop_make_request_real;
1716
	lo->lo_queue->make_request_fn = loop_make_request_real;
(-)loop-AES-v3.2e/loop_serpent.c (-1 / +1 lines)
Lines 1117-1123 Link Here
1117
    extern void md5_transform_CPUbyteorder_C(u_int32_t *, u_int32_t const *);
1117
    extern void md5_transform_CPUbyteorder_C(u_int32_t *, u_int32_t const *);
1118
1118
1119
#if LINUX_VERSION_CODE >= 0x20200
1119
#if LINUX_VERSION_CODE >= 0x20200
1120
    if(lo->lo_key_owner != current->uid && !capable(CAP_SYS_ADMIN))
1120
    if(lo->lo_key_owner != current->cred->uid && !capable(CAP_SYS_ADMIN))
1121
        return -EPERM;
1121
        return -EPERM;
1122
#endif
1122
#endif
1123
1123
(-)loop-AES-v3.2e/loop_twofish.c (-1 / +1 lines)
Lines 515-521 Link Here
515
    extern void md5_transform_CPUbyteorder_C(u_int32_t *, u_int32_t const *);
515
    extern void md5_transform_CPUbyteorder_C(u_int32_t *, u_int32_t const *);
516
516
517
#if LINUX_VERSION_CODE >= 0x20200
517
#if LINUX_VERSION_CODE >= 0x20200
518
    if(lo->lo_key_owner != current->uid && !capable(CAP_SYS_ADMIN))
518
    if(lo->lo_key_owner != current->cred->uid && !capable(CAP_SYS_ADMIN))
519
        return -EPERM;
519
        return -EPERM;
520
#endif
520
#endif
521
521

Return to bug 261709