1 '\" te 2 .\" Copyright (c) 1999 Sun Microsystems, Inc. All Rights Reserved 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 6 .TH KVA_MATCH 3SECDB "Aug 12, 1999" 7 .SH NAME 8 kva_match \- look up a key in a key-value array 9 .SH SYNOPSIS 10 .LP 11 .nf 12 cc [ \fIflag\fR... ] \fIfile\fR...- lsecdb [ \fIlibrary\fR... ] 13 #include <secdb.h> 14 15 \fBchar *\fR\fBkva_match\fR(\fBkva_t *\fR\fIkva\fR, \fBchar *\fR\fIkey\fR); 16 .fi 17 18 .SH DESCRIPTION 19 .sp 20 .LP 21 The \fBkva_match()\fR function searches a \fBkva_t\fR structure, which is part 22 of the \fBauthattr_t\fR, \fBexecattr_t\fR, \fBprofattr_t\fR, or 23 \fBuserattr_t\fR structures. The function takes two arguments: a pointer to a 24 key value array, and a key. If the key is in the array, the function returns a 25 pointer to the first corresponding value that matches that key. Otherwise, the 26 function returns \fINULL\fR. 27 .SH RETURN VALUES 28 .sp 29 .LP 30 Upon successful completion, the function returns a pointer to the value sought. 31 Otherwise, it returns \fINULL\fR. 32 .SH ATTRIBUTES 33 .sp 34 .LP 35 See \fBattributes\fR(5) for descriptions of the following attributes: 36 .sp 37 38 .sp 39 .TS 40 box; 41 c | c 42 l | l . 43 ATTRIBUTE TYPE ATTRIBUTE VALUE 44 _ 45 MT-Level MT-Safe 46 .TE 47 48 .SH SEE ALSO 49 .sp 50 .LP 51 \fBgetauthattr\fR(3SECDB), \fBgetexecattr\fR(3SECDB), 52 \fBgetprofattr\fR(3SECDB), \fBgetuserattr\fR(3SECDB) 53 .SH NOTES 54 .sp 55 .LP 56 The \fBkva_match()\fR function returns a pointer to data that already exists in 57 the key-value array. It does not allocate its own memory for this pointer but 58 obtains it from the key-value array that is passed as its first argument.