| 1 | '\" t |
| 2 | .\" <!-- Copyright 2004 Double Precision, Inc. See COPYING for --> |
| 3 | .\" <!-- distribution information. --> |
| 4 | .\" Title: auth_getoption |
| 5 | .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
| 6 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> |
| 7 | .\" Date: 06/20/2015 |
| 8 | .\" Manual: Double Precision, Inc. |
| 9 | .\" Source: Double Precision, Inc. |
| 10 | .\" Language: English |
| 11 | .\" |
| 12 | .TH "AUTH_GETOPTION" "3" "06/20/2015" "Double Precision, Inc." "Double Precision, Inc." |
| 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 | .\" ----------------------------------------------------------------- |
| 25 | .\" disable hyphenation |
| 26 | .nh |
| 27 | .\" disable justification (adjust text to left margin only) |
| 28 | .ad l |
| 29 | .\" ----------------------------------------------------------------- |
| 30 | .\" * MAIN CONTENT STARTS HERE * |
| 31 | .\" ----------------------------------------------------------------- |
| 32 | .SH "NAME" |
| 33 | auth_getoption \- Search an option string |
| 34 | .SH "SYNOPSIS" |
| 35 | .sp |
| 36 | .nf |
| 37 | #include <courierauth\&.h> |
| 38 | .fi |
| 39 | .HP \w'char\ *value=auth_getoption('u |
| 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 |
| 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\&. |
| 48 | .PP |
| 49 | \fIoptions\fR |
| 50 | is the |
| 51 | \fIoptions\fR |
| 52 | field from |
| 53 | authinfo |
| 54 | (which can be |
| 55 | NULL)\&. As described in |
| 56 | \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2 |
| 57 | (and the others), it is a comma\-separated list of |
| 58 | \(lq\fIkeyword\fR=\fIvalue\fR\(rq |
| 59 | pairs\&. |
| 60 | .PP |
| 61 | \fBauth_getoption\fR |
| 62 | searches |
| 63 | \fIoptions\fR |
| 64 | for a |
| 65 | \fIkeyword\fR\&. |
| 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 |
| 78 | ENOENT\&. Otherwise |
| 79 | \fBauth_getoption\fR |
| 80 | allocates a buffer for |
| 81 | \fIvalue\fR, and returns it\&. It is the caller\*(Aqs responsibility to |
| 82 | \fBfree\fR(3) |
| 83 | the returned buffer\&. |
| 84 | .PP |
| 85 | \fBauth_getoption\fR |
| 86 | returns |
| 87 | NULL |
| 88 | with |
| 89 | \fIerrno\fR |
| 90 | set to |
| 91 | ENOMEM |
| 92 | if it cannot allocate a buffer\&. |
| 93 | .SH "SEE ALSO" |
| 94 | .PP |
| 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\&. |
| 99 | .SH "NOTES" |
| 100 | .IP " 1." 4 |
| 101 | \fBauth_generic\fR(3) |
| 102 | .RS 4 |
| 103 | \%http://www.courier-mta.org/authlib/auth_generic.html |
| 104 | .RE |
| 105 | .IP " 2." 4 |
| 106 | \fBauth_login\fR(3) |
| 107 | .RS 4 |
| 108 | \%http://www.courier-mta.org/authlib/auth_login.html |
| 109 | .RE |
| 110 | .IP " 3." 4 |
| 111 | \fBauth_getuserinfo\fR(3) |
| 112 | .RS 4 |
| 113 | \%http://www.courier-mta.org/authlib/auth_getuserinfo.html |
| 114 | .RE |
| 115 | .IP " 4." 4 |
| 116 | \fBauth_passwd\fR(3) |
| 117 | .RS 4 |
| 118 | \%http://www.courier-mta.org/authlib/auth_passwd.html |
| 119 | .RE |
| 120 | .IP " 5." 4 |
| 121 | \fBauthlib\fR(3) |
| 122 | .RS 4 |
| 123 | \%http://www.courier-mta.org/authlib/authlib.html |
| 124 | .RE |