nsssrv_cmd.c revision 065771c9859df9c4137daa5187be3aa5633b3cd5
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce NSS Responder
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce Copyright (C) Simo Sorce <ssorce@redhat.com> 2008
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce This program is free software; you can redistribute it and/or modify
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce it under the terms of the GNU General Public License as published by
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce the Free Software Foundation; either version 3 of the License, or
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce (at your option) any later version.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce This program is distributed in the hope that it will be useful,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce but WITHOUT ANY WARRANTY; without even the implied warranty of
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce GNU General Public License for more details.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce You should have received a copy of the GNU General Public License
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce along with this program. If not, see <http://www.gnu.org/licenses/>.
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorcestatic int nss_cmd_send_error(struct nss_cmd_ctx *cmdctx, int err)
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorcestatic int nss_cmd_send_empty(struct nss_cmd_ctx *cmdctx)
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorceint nss_cmd_done(struct nss_cmd_ctx *cmdctx, int ret)
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* all fine, just return here */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* async processing, just return here */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* very bad error */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce/***************************
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce * Enumeration procedures *
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce ***************************/
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce return setent_add_ref(memctx, getent_ctx, &getent_ctx->reqs, req);
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorcevoid nss_setent_notify_error(struct getent_ctx *getent_ctx, errno_t ret)
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorcevoid nss_setent_notify_done(struct getent_ctx *getent_ctx)
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce/****************************************************************************
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * PASSWD db related functions
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ***************************************************************************/
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorcestatic gid_t get_gid_override(struct ldb_message *msg,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ldb_msg_find_attr_as_uint64(msg, SYSDB_GIDNUM, 0);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorcestatic const char *get_homedir_override(TALLOC_CTX *mem_ctx,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce const char *name,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* Check whether we are unconditionally overriding the server
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * for home directory locations.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce return expand_homedir_template(mem_ctx, dom->override_homedir,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce return expand_homedir_template(mem_ctx, nctx->override_homedir,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce homedir = ldb_msg_find_attr_as_string(msg, SYSDB_HOMEDIR, NULL);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* In the case of a NULL or empty homedir, check to see if
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * we have a fallback homedir to use.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce return expand_homedir_template(mem_ctx, dom->fallback_homedir,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce return expand_homedir_template(mem_ctx, nctx->fallback_homedir,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* Return the value we got from the provider */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorcestatic const char *get_shell_override(TALLOC_CTX *mem_ctx,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce user_shell = ldb_msg_find_attr_as_string(msg, SYSDB_SHELL, NULL);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* Check whether there is a default shell specified */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce return talloc_strdup(mem_ctx, nctx->default_shell);
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce if (!nctx->allowed_shells && !nctx->vetoed_shells) return talloc_strdup(mem_ctx, user_shell);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce if (strcmp(nctx->vetoed_shells[i], user_shell) == 0) {
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce return talloc_strdup(mem_ctx, nctx->shell_fallback);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce if (strcmp(user_shell, nctx->etc_shells[i]) == 0) {
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(9, ("Using original shell '%s'\n", user_shell));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce if (strcmp(nctx->allowed_shells[i], user_shell) == 0) {
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(5, ("The shell '%s' is allowed but does not exist. "
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce return talloc_strdup(mem_ctx, nctx->shell_fallback);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(5, ("The shell '%s' is not allowed and does not exist.\n",
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce const char *tmpstr;
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce for (i = 0; i < *count; i++) {
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce orig_name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce uid = ldb_msg_find_attr_as_uint64(msg, SYSDB_UIDNUM, 0);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(SSSDBG_OP_FAILURE, ("Incomplete user object for %s[%llu]! Skipping\n",
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce orig_name?orig_name:"<NULL>", (unsigned long long int)uid));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(4, ("User [%s@%s] filtered out! (negative cache)\n",
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* first 2 fields (len and reserved), filled up later */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ret = sss_packet_grow(packet, 2*sizeof(uint32_t));
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce tmpstr = sss_get_cased_name(tmp_ctx, orig_name, dom->case_sensitive);
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce ("sss_get_cased_name failed, skipping\n"));
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce tmpstr = ldb_msg_find_attr_as_string(msg, SYSDB_GECOS, NULL);
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce tmpstr = get_homedir_override(tmp_ctx, msg, nctx, dom, name.str, uid);
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce rsize = 2 * sizeof(uint32_t) + name.len + gecos.len +
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* need more space, got creative with the print format ? */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce DEBUG(1, ("Failed to generate a fully qualified name for user "
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce "[%s] in [%s]! Skipping user.\n", name.str, domain));
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce to_sized_string(&fullname, (const char *)&body[rp]);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(1, ("Failed to store user %s(%s) in mmap cache!",
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* if there are no results just return ENOENT,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * let the caller decide if this is the last packet or not */
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorcestatic int nss_cmd_getpw_send_reply(struct nss_dom_ctx *dctx, bool filter)
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorcestatic void nsssrv_dp_send_acct_req_done(struct tevent_req *req);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce/* FIXME: do not check res->count, but get in a msgs and check in parent */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce/* FIXME: do not sss_cmd_done, but return error and let parent do it */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* when searching for a user or netgroup, more than one reply is a
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce if ((req_type == SSS_DP_USER || req_type == SSS_DP_NETGR) &&
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(1, ("getpwXXX call returned more than one result!"
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce " DB Corrupted?\n"));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* if we have any reply let's check cache validity */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce cacheExpire = ldb_msg_find_attr_as_uint64(res->msgs[0],
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce cacheExpire = ldb_msg_find_attr_as_uint64(res->msgs[0],
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* if we have any reply let's check cache validity */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ret = sss_cmd_check_cache(res->msgs[0], nctx->cache_refresh_percent,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(SSSDBG_TRACE_FUNC, ("Cached entry is valid, returning..\n"));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(SSSDBG_CRIT_FAILURE, ("Error checking cache: %d\n", ret));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* No replies */
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce /* EAGAIN (off band) or ENOENT (cache miss) -> check cache */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* No callback required
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * This was an out-of-band update. We'll return EOK
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * so the calling function can return the cached entry
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * immediately.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ("Performing midpoint cache update on [%s]\n", opt_name));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce req = sss_dp_get_account_send(cctx, cctx->rctx, dctx->domain, true,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ("Out of memory sending out-of-band data provider "
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce "request\n"));
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* This is non-fatal, so we'll continue here */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(SSSDBG_TRACE_FUNC, ("Updating cache out-of-band\n"));
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce /* We don't need to listen for a reply, so we will free the
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce * request here.
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce /* This is a cache miss. Or the cache is expired.
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce * We need to get the updated user information before returning it.
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce /* dont loop forever :-) */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* keep around current data in case backend is offline */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce req = sss_dp_get_account_send(cctx, cctx->rctx, dctx->domain, true,
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ("Out of memory sending data provider request\n"));
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce cb_ctx = talloc_zero(dctx, struct dp_callback_ctx);
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorce tevent_req_set_callback(req, nsssrv_dp_send_acct_req_done, cb_ctx);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorcestatic void nsssrv_dp_send_acct_req_done(struct tevent_req *req)
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce tevent_req_callback_data(req, struct dp_callback_ctx);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce ret = sss_dp_get_account_recv(cb_ctx->mem_ctx, req,
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce cb_ctx->callback(err_maj, err_min, err_msg, cb_ctx->ptr);
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorcestatic void nss_cmd_getpwnam_dp_callback(uint16_t err_maj, uint32_t err_min,
a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7Simo Sorce/* search for a user.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * ENOENT, if user is definitely not found
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * EAGAIN, if user is beeing fetched from backend via async operations
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * EOK, if found
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * anything else on a fatal error
e625eb47a3091d92eda2271b123f8aab06227b63Simo Sorcestatic int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce /* if it is a domainless search, skip domains that require fully
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce * qualified names instead */
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce while (dom && cmdctx->check_next && dom->fqnames) {
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce if (!dom) break;
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* make sure we reset the check_provider flag when we check
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce * a new domain */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce dctx->check_provider = NEED_CHECK_PROVIDER(dom->provider);
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* make sure to update the dctx if we changed domain */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce name = sss_get_cased_name(dctx, cmdctx->name, dom->case_sensitive);
6c82774653f37945bdd0a311eb1ecc289cac683dLukas Slebodnik /* verify this user has not yet been negatively cached,
6c82774653f37945bdd0a311eb1ecc289cac683dLukas Slebodnik * or has been permanently filtered */
6c82774653f37945bdd0a311eb1ecc289cac683dLukas Slebodnik ret = sss_ncache_check_user(nctx->ncache, nctx->neg_timeout,
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* if neg cached, return we didn't find it */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce DEBUG(2, ("User [%s] does not exist in [%s]! (negative cache)\n",
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce /* if a multidomain search, try with next */
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce /* There are no further domains or this was a
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce * fully-qualified user request.
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce ret = sysdb_getpwnam(cmdctx, sysdb, name, &dctx->res);
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce DEBUG(1, ("Failed to make request to our cache!\n"));
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce DEBUG(0, ("getpwnam call returned more than one result !?!\n"));
1dd679584241a0f9b29072c7eed1c5c5e4a577e4Simo Sorce if (dctx->res->count == 0 && !dctx->check_provider) {
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce /* set negative cache only if not result of cache check */
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce ret = sss_ncache_set_user(nctx->ncache, false, dom, name);
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce /* if a multidomain search, try with next */
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce if (dom) continue;
8f2a34cc6964a1f80a1434e05315a7ae0bb5774eSimo Sorce /* if this is a caching provider (or if we haven't checked the cache
625bb2ddf15e8f305a53afa44e87f2146fa930afSimo Sorce * yet) then verify that the cache is uptodate */
return ret;
return EOK;
return ENOENT;
int ret;
if (err_maj) {
goto done;
goto done;
done:
if (ret) {
const char *rawname;
char *domname;
int ret;
if (!cmdctx) {
return ENOMEM;
if (!dctx) {
goto done;
goto done;
goto done;
goto done;
goto done;
if (domname) {
goto done;
goto done;
done:
goto done;
goto done;
if (domname) {
goto done;
done:
int ret;
while (dom) {
return ENOENT;
return EIO;
return EIO;
return ENOENT;
return ret;
return ENOENT;
dctx);
return ret;
return EOK;
return ENOENT;
int ret;
if (err_maj) {
goto done;
goto done;
done:
if (ret) {
int ret;
if (!cmdctx) {
return ENOMEM;
if (!dctx) {
goto done;
goto done;
goto done;
done:
if (!cmdctx) {
return ENOMEM;
if (!req) {
goto done;
done:
if (!req) {
return NULL;
goto error;
goto error;
return NULL;
return req;
goto error;
if (!step_ctx) {
goto error;
return req;
return req;
void *pvt);
while (dom) {
if (!dom) break;
return EIO;
if (!dpreq) {
if(!cb_ctx) {
return ENOMEM;
return EAGAIN;
return ENOMEM;
if (!te) {
return EAGAIN;
return EOK;
void *pvt)
int ret;
if (err_maj) {
return EOK;
if (!cmdctx) {
return ENOMEM;
if (!req) {
return EIO;
return EOK;
int ret;
return EINVAL;
return ret;
return EOK;
true, false, msgs, &n);
none:
return ret;
int ret;
return ret;
done:
return EOK;
#define GID_ROFFSET 0
int *_memnum)
char *tmpstr;
if (add_domain) {
delim = 0;
dom_len = 0;
return ENOMEM;
if (add_domain) {
goto done;
if (add_domain) {
goto done;
delim += t;
goto done;
if (add_domain) {
memnum++;
done:
return ret;
int *count)
const char *tmpstr;
const char *orig_name;
const char *namefmt;
if (add_domain) {
delim = 0;
dom_len = 0;
num = 0;
goto done;
rsize = 0;
for (i = 0; i < *count; i++) {
rsize = 0;
if (filter_groups) {
num = 0;
goto done;
if (add_domain) {
num = 0;
goto done;
rsize += t;
delim += t;
num = 0;
goto done;
rsize = 0;
memnum = 0;
if (el) {
num = 0;
goto done;
if (el) {
num = 0;
goto done;
if (memnum) {
num++;
done:
*count = i;
if (num == 0) {
return ENOENT;
return EOK;
int ret;
return EFAULT;
if (ret) {
return ret;
return EOK;
int ret;
while (dom) {
if (!dom) break;
return ENOENT;
return EIO;
return EIO;
return ENOENT;
return ret;
if (dom) continue;
return ENOENT;
dctx);
return ret;
return EOK;
return ENOENT;
int ret;
if (err_maj) {
goto done;
goto done;
done:
if (ret) {
const char *rawname;
char *domname;
int ret;
if (!cmdctx) {
return ENOMEM;
if (!dctx) {
goto done;
goto done;
goto done;
goto done;
goto done;
if (domname) {
goto done;
goto done;
done:
goto done;
goto done;
if (domname) {
goto done;
done:
int ret;
while (dom) {
return ENOENT;
return EIO;
return EIO;
return ENOENT;
return ret;
return ENOENT;
dctx);
return ret;
return EOK;
return ENOENT;
int ret;
if (err_maj) {
goto done;
goto done;
done:
if (ret) {
int ret;
if (!cmdctx) {
return ENOMEM;
if (!dctx) {
goto done;
goto done;
goto done;
done:
if (!cmdctx) {
return ENOMEM;
if (!req) {
goto done;
done:
if (!req) {
return NULL;
goto error;
goto error;
return NULL;
return req;
goto error;
if (!step_ctx) {
goto error;
return req;
return req;
void *pvt);
while (dom) {
if (!dom) break;
return EIO;
if (!dpreq) {
if(!cb_ctx) {
return ENOMEM;
return EAGAIN;
return ENOMEM;
if (!te) {
return EAGAIN;
return EOK;
void *pvt)
int ret;
if (err_maj) {
return EOK;
none:
return ret;
int ret;
return EINVAL;
return ret;
return EOK;
if (!cmdctx) {
return ENOMEM;
if (!req) {
return EIO;
return EOK;
int ret;
return ret;
done:
return EOK;
int skipped = 0;
const char *posix;
return ENOENT;
return ret;
bindex = 0;
for (i = 0; i < num; i++) {
if (!gid) {
skipped++;
return EFAULT;
bindex++;
return EOK;
int ret;
return EFAULT;
if (ret) {
return ret;
return EOK;
int ret;
while (dom) {
if (!dom) break;
return ENOENT;
return EIO;
return EIO;
return ret;
if (dom) continue;
return ENOENT;
dctx);
return ret;
return EOK;
return ENOENT;
int ret;
if (err_maj) {
goto done;
goto done;
done:
if (ret) {
const char *rawname;
char *domname;
int ret;
if (!cmdctx) {
return ENOMEM;
if (!dctx) {
goto done;
goto done;
goto done;
goto done;
goto done;
if (domname) {
goto done;
goto done;
done:
goto done;
goto done;
if (domname) {
goto done;
done:
return nss_cli_protocol_version;
return nss_cmds;
return EINVAL;