auth_getoption(3)

auth_getoption3

Search an option string

Usage

#include <courierauth.h>

char *value=auth_getoption(const char *options, const char *keyword);

Overview

This is a convenience function for parsing account options, as received by the callback function invoked by auth_generic_meta(3)[1], auth_login_meta(3)[2], auth_getuserinfo_meta(3)[3], and auth_passwd(3)[4].

options is the options field from authinfo (which can be NULL). As described in auth_generic_meta(3)[1] (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's responsibility to free(3) the returned buffer.

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

Notes

1.

auth_generic_meta(3)

http://www.courier-mta.org/authlib/auth_generic.html

2.

auth_login_meta(3)

http://www.courier-mta.org/authlib/auth_login.html

3.

auth_getuserinfo_meta(3)

http://www.courier-mta.org/authlib/auth_getuserinfo.html

4.

auth_passwd(3)

http://www.courier-mta.org/authlib/auth_passwd.html

5.

authlib(3)

http://www.courier-mta.org/authlib/authlib.html

Releases

10 releases since Debian 4.0 (Etch); the text changed 6 times.

  1. 4.0
  2. 5.0
  3. 6.0–7
  4. 8
  5. 9
  6. 10
  7. 11–13

From courier-authlib-dev 0.72.4-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.