Commit | Line | Data |
---|---|---|
d9898ee8 | 1 | <?xml version="1.0"?> |
b0322a85 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>auth_getoption</title><link rel="stylesheet" type="text/css" href="style.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/><link rel="home" href="#auth-getoption" title="auth_getoption"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!-- |
d9898ee8 | 3 | |
b0322a85 | 4 | Copyright 1998 - 2009 Double Precision, Inc. See COPYING for distribution |
d9898ee8 | 5 | information. |
6 | ||
b0322a85 | 7 | --></head><body><div class="refentry"><a id="auth-getoption" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>auth_getoption — Search an option string</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="literallayout"><p><br clear="none"/> |
d9898ee8 | 8 | #include <courierauth.h><br clear="none"/> |
d50284c4 | 9 | </p></div><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td rowspan="1" colspan="1"><code class="funcdef">char *value=<strong>auth_getoption</strong>(</code></td><td rowspan="1" colspan="1">const char *<var class="pdparam">options</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">const char *<var class="pdparam">keyword</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a id="idm255212237376" shape="rect"> </a><h2>DESCRIPTION</h2><p> |
d9898ee8 | 10 | This is a convenience function for parsing account options, as received |
11 | by the callback function invoked by | |
8d138742 CE |
12 | <a class="ulink" href="auth_generic.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_generic</span>(3)</span></a>, |
13 | <a class="ulink" href="auth_login.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_login</span>(3)</span></a>, | |
14 | <a class="ulink" href="auth_getuserinfo.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_getuserinfo</span>(3)</span></a>, | |
d9898ee8 | 15 | and |
8d138742 | 16 | <a class="ulink" href="auth_passwd.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_passwd</span>(3)</span></a>.</p><p> |
d9898ee8 | 17 | <em class="parameter"><code>options</code></em> is the |
18 | <em class="structfield"><code>options</code></em> field from | |
19 | <span class="structname">authinfo</span> (which can be <code class="literal">NULL</code>). | |
20 | As described in | |
8d138742 | 21 | <a class="ulink" href="auth_generic.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_generic</span>(3)</span></a> |
d9898ee8 | 22 | (and the others), it is a comma-separated list of |
b0322a85 | 23 | <span class="quote">“<span class="quote"><em class="replaceable"><code>keyword</code></em>=<em class="replaceable"><code>value</code></em></span>”</span> |
d9898ee8 | 24 | pairs.</p><p> |
25 | <code class="function">auth_getoption</code> searches | |
26 | <em class="parameter"><code>options</code></em> for a | |
d50284c4 | 27 | <em class="parameter"><code>keyword</code></em>.</p></div><div class="refsect1"><a id="idm255215306320" shape="rect"> </a><h2>RETURNS</h2><p> |
d9898ee8 | 28 | If |
29 | <em class="parameter"><code>options</code></em> does not have the | |
30 | <em class="parameter"><code>keyword</code></em>, | |
31 | <code class="function">auth_getoption</code> returns <code class="literal">NULL</code> with | |
32 | <code class="varname">errno</code> set to <code class="literal">ENOENT</code>. | |
33 | Otherwise | |
34 | <code class="function">auth_getoption</code> allocates a buffer for | |
35 | <em class="replaceable"><code>value</code></em>, and returns it. | |
36 | It is the caller's responsibility to | |
37 | <span class="citerefentry"><span class="refentrytitle">free</span>(3)</span> | |
38 | the returned buffer.</p><p> | |
39 | <code class="function">auth_getoption</code> returns <code class="literal">NULL</code> with | |
40 | <code class="varname">errno</code> set to <code class="literal">ENOMEM</code> if it cannot | |
d50284c4 | 41 | allocate a buffer.</p></div><div class="refsect1"><a id="idm255210010384" shape="rect"> </a><h2>SEE ALSO</h2><p> |
8d138742 | 42 | <a class="ulink" href="authlib.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">authlib</span>(3)</span></a>, |
d9898ee8 | 43 | |
8d138742 | 44 | <a class="ulink" href="auth_generic.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_generic</span>(3)</span></a>, |
d9898ee8 | 45 | |
8d138742 | 46 | <a class="ulink" href="auth_login.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_login</span>(3)</span></a>, |
d9898ee8 | 47 | |
8d138742 | 48 | <a class="ulink" href="auth_getuserinfo.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_getuserinfo</span>(3)</span></a>.</p></div></div></body></html> |