t
<!-- Copyright 2004 Double Precision, Inc. See COPYING for -->
<!-- distribution information. -->
Title: auth_getoption
Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
Date: 10/28/2020
Manual: Double Precision, Inc.
Source: Double Precision, Inc.
Language: English

"AUTH_GETOPTION" "3" "10/28/2020" "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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
"NAME"
auth_getoption - Search an option string
"SYNOPSIS"
#include <courierauth.h>

\w'char *value=auth_getoption('u "char *value=auth_getoption(const char *" "options" ", const char *" "keyword" ");"

"DESCRIPTION"

This is a convenience function for parsing account options, as received by the callback function invoked by \m[blue]auth_generic_meta(3)\m[]\s-2\u[1]\d\s+2, \m[blue]auth_login_meta(3)\m[]\s-2\u[2]\d\s+2, \m[blue]auth_getuserinfo_meta(3)\m[]\s-2\u[3]\d\s+2, and \m[blue]auth_passwd(3)\m[]\s-2\u[4]\d\s+2.

options is the options field from authinfo (which can be NULL). As described in \m[blue]auth_generic_meta(3)\m[]\s-2\u[1]\d\s+2 (and the others), it is a comma-separated list of "keyword=value" pairs.

auth_getoption searches options for a keyword.

"RETURNS"

If options does not have the keyword, auth_getoption returns NULL with errno set to ENOENT. Otherwise auth_getoption allocates a buffer for value, and returns it. It is the caller\*(Aqs responsibility to free(3) the returned buffer.

auth_getoption returns NULL with errno set to ENOMEM if it cannot allocate a buffer.

"SEE ALSO"

\m[blue]authlib(3)\m[]\s-2\u[5]\d\s+2, \m[blue]auth_generic_meta(3)\m[]\s-2\u[1]\d\s+2, \m[blue]auth_login_meta(3)\m[]\s-2\u[2]\d\s+2, \m[blue]auth_getuserinfo_meta(3)\m[]\s-2\u[3]\d\s+2.

"NOTES"
" 1." 4
auth_generic_meta(3)
" 2." 4
auth_login_meta(3)
" 3." 4
auth_getuserinfo_meta(3)
" 4." 4
auth_passwd(3)
" 5." 4
authlib(3)