Commit | Line | Data |
---|---|---|
d9898ee8 | 1 | .\" <!-- $Id: auth_getoption.sgml,v 1.3 2007/04/01 00:21:34 mrsam Exp $ --> |
2 | .\" <!-- Copyright 2004 Double Precision, Inc. See COPYING for --> | |
3 | .\" <!-- distribution information. --> | |
4 | .\" Title: auth_getoption | |
5 | .\" Author: | |
8d138742 CE |
6 | .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/> |
7 | .\" Date: 08/23/2008 | |
d9898ee8 | 8 | .\" Manual: Double Precision, Inc. |
9 | .\" Source: Double Precision, Inc. | |
10 | .\" | |
8d138742 | 11 | .TH "AUTH_GETOPTION" "3" "08/23/2008" "Double Precision, Inc." "Double Precision, Inc." |
d9898ee8 | 12 | .\" disable hyphenation |
13 | .nh | |
14 | .\" disable justification (adjust text to left margin only) | |
15 | .ad l | |
16 | .SH "NAME" | |
8d138742 | 17 | auth_getoption - Search an option string |
d9898ee8 | 18 | .SH "SYNOPSIS" |
19 | .sp | |
20 | .RS 4 | |
21 | .nf | |
8d138742 | 22 | #include <courierauth\.h> |
d9898ee8 | 23 | .fi |
24 | .RE | |
25 | .HP 27 | |
26 | .BI "char *value=auth_getoption(const\ char\ *" "options" ", const\ char\ *" "keyword" ");" | |
27 | .SH "DESCRIPTION" | |
28 | .PP | |
29 | This is a convenience function for parsing account options, as received by the callback function invoked by | |
30 | \fI\fBauth_generic\fR(3)\fR\&[1], | |
31 | \fI\fBauth_login\fR(3)\fR\&[2], | |
32 | \fI\fBauth_getuserinfo\fR(3)\fR\&[3], and | |
8d138742 | 33 | \fI\fBauth_passwd\fR(3)\fR\&[4]\. |
d9898ee8 | 34 | .PP |
35 | ||
36 | \fIoptions\fR | |
37 | is the | |
38 | options | |
39 | field from | |
40 | authinfo | |
41 | (which can be | |
8d138742 | 42 | NULL)\. As described in |
d9898ee8 | 43 | \fI\fBauth_generic\fR(3)\fR\&[1] |
44 | (and the others), it is a comma\-separated list of | |
45 | \(lq\fIkeyword\fR=\fIvalue\fR\(rq | |
8d138742 | 46 | pairs\. |
d9898ee8 | 47 | .PP |
48 | ||
49 | \fBauth_getoption\fR | |
50 | searches | |
51 | \fIoptions\fR | |
52 | for a | |
8d138742 | 53 | \fIkeyword\fR\. |
d9898ee8 | 54 | .SH "RETURNS" |
55 | .PP | |
56 | If | |
57 | \fIoptions\fR | |
58 | does not have the | |
59 | \fIkeyword\fR, | |
60 | \fBauth_getoption\fR | |
61 | returns | |
62 | NULL | |
63 | with | |
64 | \fIerrno\fR | |
65 | set to | |
8d138742 | 66 | ENOENT\. Otherwise |
d9898ee8 | 67 | \fBauth_getoption\fR |
68 | allocates a buffer for | |
8d138742 | 69 | \fIvalue\fR, and returns it\. It is the caller\'s responsibility to |
d9898ee8 | 70 | \fBfree\fR(3) |
8d138742 | 71 | the returned buffer\. |
d9898ee8 | 72 | .PP |
73 | ||
74 | \fBauth_getoption\fR | |
75 | returns | |
76 | NULL | |
77 | with | |
78 | \fIerrno\fR | |
79 | set to | |
80 | ENOMEM | |
8d138742 | 81 | if it cannot allocate a buffer\. |
d9898ee8 | 82 | .SH "SEE ALSO" |
83 | .PP | |
84 | ||
85 | \fI\fBauthlib\fR(3)\fR\&[5], | |
86 | \fI\fBauth_generic\fR(3)\fR\&[1], | |
87 | \fI\fBauth_login\fR(3)\fR\&[2], | |
8d138742 CE |
88 | \fI\fBauth_getuserinfo\fR(3)\fR\&[3]\. |
89 | .SH "NOTES" | |
d9898ee8 | 90 | .IP " 1." 4 |
91 | \fBauth_generic\fR(3) | |
92 | .RS 4 | |
93 | \%auth_generic.html | |
94 | .RE | |
95 | .IP " 2." 4 | |
96 | \fBauth_login\fR(3) | |
97 | .RS 4 | |
98 | \%auth_login.html | |
99 | .RE | |
100 | .IP " 3." 4 | |
101 | \fBauth_getuserinfo\fR(3) | |
102 | .RS 4 | |
103 | \%auth_getuserinfo.html | |
104 | .RE | |
105 | .IP " 4." 4 | |
106 | \fBauth_passwd\fR(3) | |
107 | .RS 4 | |
108 | \%auth_passwd.html | |
109 | .RE | |
110 | .IP " 5." 4 | |
111 | \fBauthlib\fR(3) | |
112 | .RS 4 | |
113 | \%authlib.html | |
114 | .RE |