Commit | Line | Data |
---|---|---|
b0322a85 | 1 | '\" t |
d9898ee8 | 2 | .\" <!-- Copyright 2004 Double Precision, Inc. See COPYING for --> |
3 | .\" <!-- distribution information. --> | |
4 | .\" Title: auth_getoption | |
0e333c05 CE |
5 | .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] |
6 | .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> | |
7 | .\" Date: 09/08/2017 | |
d9898ee8 | 8 | .\" Manual: Double Precision, Inc. |
9 | .\" Source: Double Precision, Inc. | |
b0322a85 | 10 | .\" Language: English |
d9898ee8 | 11 | .\" |
0e333c05 | 12 | .TH "AUTH_GETOPTION" "3" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc." |
b0322a85 CE |
13 | .\" ----------------------------------------------------------------- |
14 | .\" * Define some portability stuff | |
15 | .\" ----------------------------------------------------------------- | |
16 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
17 | .\" http://bugs.debian.org/507673 | |
18 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | |
19 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
20 | .ie \n(.g .ds Aq \(aq | |
21 | .el .ds Aq ' | |
22 | .\" ----------------------------------------------------------------- | |
23 | .\" * set default formatting | |
24 | .\" ----------------------------------------------------------------- | |
d9898ee8 | 25 | .\" disable hyphenation |
26 | .nh | |
27 | .\" disable justification (adjust text to left margin only) | |
28 | .ad l | |
b0322a85 CE |
29 | .\" ----------------------------------------------------------------- |
30 | .\" * MAIN CONTENT STARTS HERE * | |
31 | .\" ----------------------------------------------------------------- | |
d9898ee8 | 32 | .SH "NAME" |
b0322a85 | 33 | auth_getoption \- Search an option string |
d9898ee8 | 34 | .SH "SYNOPSIS" |
35 | .sp | |
d9898ee8 | 36 | .nf |
b0322a85 | 37 | #include <courierauth\&.h> |
d9898ee8 | 38 | .fi |
b0322a85 | 39 | .HP \w'char\ *value=auth_getoption('u |
d9898ee8 | 40 | .BI "char *value=auth_getoption(const\ char\ *" "options" ", const\ char\ *" "keyword" ");" |
41 | .SH "DESCRIPTION" | |
42 | .PP | |
43 | This is a convenience function for parsing account options, as received by the callback function invoked by | |
b0322a85 CE |
44 | \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2, |
45 | \m[blue]\fB\fBauth_login\fR(3)\fR\m[]\&\s-2\u[2]\d\s+2, | |
46 | \m[blue]\fB\fBauth_getuserinfo\fR(3)\fR\m[]\&\s-2\u[3]\d\s+2, and | |
47 | \m[blue]\fB\fBauth_passwd\fR(3)\fR\m[]\&\s-2\u[4]\d\s+2\&. | |
d9898ee8 | 48 | .PP |
d9898ee8 | 49 | \fIoptions\fR |
50 | is the | |
b0322a85 | 51 | \fIoptions\fR |
d9898ee8 | 52 | field from |
53 | authinfo | |
54 | (which can be | |
b0322a85 CE |
55 | NULL)\&. As described in |
56 | \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2 | |
d9898ee8 | 57 | (and the others), it is a comma\-separated list of |
58 | \(lq\fIkeyword\fR=\fIvalue\fR\(rq | |
b0322a85 | 59 | pairs\&. |
d9898ee8 | 60 | .PP |
d9898ee8 | 61 | \fBauth_getoption\fR |
62 | searches | |
63 | \fIoptions\fR | |
64 | for a | |
b0322a85 | 65 | \fIkeyword\fR\&. |
d9898ee8 | 66 | .SH "RETURNS" |
67 | .PP | |
68 | If | |
69 | \fIoptions\fR | |
70 | does not have the | |
71 | \fIkeyword\fR, | |
72 | \fBauth_getoption\fR | |
73 | returns | |
74 | NULL | |
75 | with | |
76 | \fIerrno\fR | |
77 | set to | |
b0322a85 | 78 | ENOENT\&. Otherwise |
d9898ee8 | 79 | \fBauth_getoption\fR |
80 | allocates a buffer for | |
b0322a85 | 81 | \fIvalue\fR, and returns it\&. It is the caller\*(Aqs responsibility to |
d9898ee8 | 82 | \fBfree\fR(3) |
b0322a85 | 83 | the returned buffer\&. |
d9898ee8 | 84 | .PP |
d9898ee8 | 85 | \fBauth_getoption\fR |
86 | returns | |
87 | NULL | |
88 | with | |
89 | \fIerrno\fR | |
90 | set to | |
91 | ENOMEM | |
b0322a85 | 92 | if it cannot allocate a buffer\&. |
d9898ee8 | 93 | .SH "SEE ALSO" |
94 | .PP | |
b0322a85 CE |
95 | \m[blue]\fB\fBauthlib\fR(3)\fR\m[]\&\s-2\u[5]\d\s+2, |
96 | \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2, | |
97 | \m[blue]\fB\fBauth_login\fR(3)\fR\m[]\&\s-2\u[2]\d\s+2, | |
98 | \m[blue]\fB\fBauth_getuserinfo\fR(3)\fR\m[]\&\s-2\u[3]\d\s+2\&. | |
8d138742 | 99 | .SH "NOTES" |
d9898ee8 | 100 | .IP " 1." 4 |
101 | \fBauth_generic\fR(3) | |
102 | .RS 4 | |
d50284c4 | 103 | \%http://www.courier-mta.org/authlib/auth_generic.html |
d9898ee8 | 104 | .RE |
105 | .IP " 2." 4 | |
106 | \fBauth_login\fR(3) | |
107 | .RS 4 | |
d50284c4 | 108 | \%http://www.courier-mta.org/authlib/auth_login.html |
d9898ee8 | 109 | .RE |
110 | .IP " 3." 4 | |
111 | \fBauth_getuserinfo\fR(3) | |
112 | .RS 4 | |
d50284c4 | 113 | \%http://www.courier-mta.org/authlib/auth_getuserinfo.html |
d9898ee8 | 114 | .RE |
115 | .IP " 4." 4 | |
116 | \fBauth_passwd\fR(3) | |
117 | .RS 4 | |
d50284c4 | 118 | \%http://www.courier-mta.org/authlib/auth_passwd.html |
d9898ee8 | 119 | .RE |
120 | .IP " 5." 4 | |
121 | \fBauthlib\fR(3) | |
122 | .RS 4 | |
d50284c4 | 123 | \%http://www.courier-mta.org/authlib/authlib.html |
d9898ee8 | 124 | .RE |