keystore.c (9cdf083f981b8d37b3212400a359368661385099) | keystore.c (c376222960ae91d5ffb9197ee36771aaed1d9f90) |
---|---|
1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * In-kernel key management code. Includes functions to parse and 4 * write authentication token-related packets with the underlying 5 * file. 6 * 7 * Copyright (C) 2004-2006 International Business Machines Corp. 8 * Author(s): Michael A. Halcrow <mhalcrow@us.ibm.com> --- 193 unchanged lines hidden (view full) --- 202 ecryptfs_printk(KERN_ERR, "Enter w/ first byte != 0x%.2x\n", 203 ECRYPTFS_TAG_3_PACKET_TYPE); 204 rc = -EINVAL; 205 goto out; 206 } 207 /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or 208 * at end of function upon failure */ 209 auth_tok_list_item = | 1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * In-kernel key management code. Includes functions to parse and 4 * write authentication token-related packets with the underlying 5 * file. 6 * 7 * Copyright (C) 2004-2006 International Business Machines Corp. 8 * Author(s): Michael A. Halcrow <mhalcrow@us.ibm.com> --- 193 unchanged lines hidden (view full) --- 202 ecryptfs_printk(KERN_ERR, "Enter w/ first byte != 0x%.2x\n", 203 ECRYPTFS_TAG_3_PACKET_TYPE); 204 rc = -EINVAL; 205 goto out; 206 } 207 /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or 208 * at end of function upon failure */ 209 auth_tok_list_item = |
210 kmem_cache_alloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL); | 210 kmem_cache_zalloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL); |
211 if (!auth_tok_list_item) { 212 ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n"); 213 rc = -ENOMEM; 214 goto out; 215 } | 211 if (!auth_tok_list_item) { 212 ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n"); 213 rc = -ENOMEM; 214 goto out; 215 } |
216 memset(auth_tok_list_item, 0, 217 sizeof(struct ecryptfs_auth_tok_list_item)); | |
218 (*new_auth_tok) = &auth_tok_list_item->auth_tok; 219 220 /* check for body size - one to two bytes */ 221 rc = parse_packet_length(&data[(*packet_size)], &body_size, 222 &length_size); 223 if (rc) { 224 ecryptfs_printk(KERN_WARNING, "Error parsing packet length; " 225 "rc = [%d]\n", rc); --- 866 unchanged lines hidden --- | 216 (*new_auth_tok) = &auth_tok_list_item->auth_tok; 217 218 /* check for body size - one to two bytes */ 219 rc = parse_packet_length(&data[(*packet_size)], &body_size, 220 &length_size); 221 if (rc) { 222 ecryptfs_printk(KERN_WARNING, "Error parsing packet length; " 223 "rc = [%d]\n", rc); --- 866 unchanged lines hidden --- |