1 KVA_MATCH(3SECDB) Security Attributes Database Library Functions 2 3 4 5 NAME 6 kva_match - look up a key in a key-value array 7 8 SYNOPSIS 9 cc [ flag... ] file... -lsecdb [ library... ] 10 #include <secdb.h> 11 12 char *kva_match(kva_t *kva, char *key); 13 14 15 DESCRIPTION 16 The kva_match() function searches a kva_t structure, which is part of 17 the authattr_t, execattr_t, profattr_t, or userattr_t structures. The 18 function takes two arguments: a pointer to a key value array, and a 19 key. If the key is in the array, the function returns a pointer to the 20 first corresponding value that matches that key. Otherwise, the 21 function returns NULL. 22 23 RETURN VALUES 24 Upon successful completion, the function returns a pointer to the value 25 sought. Otherwise, it returns NULL. 26 27 ATTRIBUTES 28 See attributes(5) for descriptions of the following attributes: 29 30 31 32 33 +---------------+-----------------+ 34 |ATTRIBUTE TYPE | ATTRIBUTE VALUE | 35 +---------------+-----------------+ 36 |MT-Level | MT-Safe | 37 +---------------+-----------------+ 38 39 SEE ALSO 40 getauthattr(3SECDB), getexecattr(3SECDB), getprofattr(3SECDB), 41 getuserattr(3SECDB) 42 43 NOTES 44 The kva_match() function returns a pointer to data that already exists 45 in the key-value array. It does not allocate its own memory for this 46 pointer but obtains it from the key-value array that is passed as its 47 first argument. 48 49 50 51 August 13, 2018 KVA_MATCH(3SECDB)