key.c (ccc3e6d9c9aea07a0b60b2b0bfc5b05a704b66d5) | key.c (e57e8669f2ab8350d30f771dd2fdd5377f183db2) |
---|---|
1/* Basic authentication token and access key management 2 * 3 * Copyright (C) 2004-2008 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 833 unchanged lines hidden (view full) --- 842 goto error_link_end; 843 } 844 845 /* if it's possible to update this type of key, search for an existing 846 * key of the same type and description in the destination keyring and 847 * update that instead if possible 848 */ 849 if (index_key.type->update) { | 1/* Basic authentication token and access key management 2 * 3 * Copyright (C) 2004-2008 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 833 unchanged lines hidden (view full) --- 842 goto error_link_end; 843 } 844 845 /* if it's possible to update this type of key, search for an existing 846 * key of the same type and description in the destination keyring and 847 * update that instead if possible 848 */ 849 if (index_key.type->update) { |
850 key_ref = __keyring_search_one(keyring_ref, &index_key, 0); | 850 key_ref = __keyring_search_one(keyring_ref, &index_key); |
851 if (!IS_ERR(key_ref)) 852 goto found_matching_key; 853 } 854 855 /* if the client doesn't provide, decide on the permissions we want */ 856 if (perm == KEY_PERM_UNDEF) { 857 perm = KEY_POS_VIEW | KEY_POS_SEARCH | KEY_POS_LINK | KEY_POS_SETATTR; 858 perm |= KEY_USR_VIEW; --- 243 unchanged lines hidden --- | 851 if (!IS_ERR(key_ref)) 852 goto found_matching_key; 853 } 854 855 /* if the client doesn't provide, decide on the permissions we want */ 856 if (perm == KEY_PERM_UNDEF) { 857 perm = KEY_POS_VIEW | KEY_POS_SEARCH | KEY_POS_LINK | KEY_POS_SETATTR; 858 perm |= KEY_USR_VIEW; --- 243 unchanged lines hidden --- |