'\" t .\" .\" .\" Title: auth_getoption .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 08/25/2013 .\" Manual: Double Precision, Inc. .\" Source: Double Precision, Inc. .\" Language: English .\" .TH "AUTH_GETOPTION" "3" "08/25/2013" "Double Precision, Inc." "Double Precision, Inc." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" auth_getoption \- Search an option string .SH "SYNOPSIS" .sp .nf #include .fi .HP \w'char\ *value=auth_getoption('u .BI "char *value=auth_getoption(const\ char\ *" "options" ", const\ char\ *" "keyword" ");" .SH "DESCRIPTION" .PP This is a convenience function for parsing account options, as received by the callback function invoked by \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2, \m[blue]\fB\fBauth_login\fR(3)\fR\m[]\&\s-2\u[2]\d\s+2, \m[blue]\fB\fBauth_getuserinfo\fR(3)\fR\m[]\&\s-2\u[3]\d\s+2, and \m[blue]\fB\fBauth_passwd\fR(3)\fR\m[]\&\s-2\u[4]\d\s+2\&. .PP \fIoptions\fR is the \fIoptions\fR field from authinfo (which can be NULL)\&. As described in \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2 (and the others), it is a comma\-separated list of \(lq\fIkeyword\fR=\fIvalue\fR\(rq pairs\&. .PP \fBauth_getoption\fR searches \fIoptions\fR for a \fIkeyword\fR\&. .SH "RETURNS" .PP If \fIoptions\fR does not have the \fIkeyword\fR, \fBauth_getoption\fR returns NULL with \fIerrno\fR set to ENOENT\&. Otherwise \fBauth_getoption\fR allocates a buffer for \fIvalue\fR, and returns it\&. It is the caller\*(Aqs responsibility to \fBfree\fR(3) the returned buffer\&. .PP \fBauth_getoption\fR returns NULL with \fIerrno\fR set to ENOMEM if it cannot allocate a buffer\&. .SH "SEE ALSO" .PP \m[blue]\fB\fBauthlib\fR(3)\fR\m[]\&\s-2\u[5]\d\s+2, \m[blue]\fB\fBauth_generic\fR(3)\fR\m[]\&\s-2\u[1]\d\s+2, \m[blue]\fB\fBauth_login\fR(3)\fR\m[]\&\s-2\u[2]\d\s+2, \m[blue]\fB\fBauth_getuserinfo\fR(3)\fR\m[]\&\s-2\u[3]\d\s+2\&. .SH "NOTES" .IP " 1." 4 \fBauth_generic\fR(3) .RS 4 \%[set $man.base.url.for.relative.links]/auth_generic.html .RE .IP " 2." 4 \fBauth_login\fR(3) .RS 4 \%[set $man.base.url.for.relative.links]/auth_login.html .RE .IP " 3." 4 \fBauth_getuserinfo\fR(3) .RS 4 \%[set $man.base.url.for.relative.links]/auth_getuserinfo.html .RE .IP " 4." 4 \fBauth_passwd\fR(3) .RS 4 \%[set $man.base.url.for.relative.links]/auth_passwd.html .RE .IP " 5." 4 \fBauthlib\fR(3) .RS 4 \%[set $man.base.url.for.relative.links]/authlib.html .RE