logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

auth_getoption - Search an option string

Description

       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.

Name

       auth_getoption - Search an option string

Notes

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.

See Also

authlib(3)[5], auth_generic_meta(3)[1], auth_login_meta(3)[2], auth_getuserinfo_meta(3)[3].

Synopsis

       #include <courierauth.h>

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

See Also