diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-14 17:04:00 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-10 22:08:47 +0100 |
commit | 0232747f04b650796db56fd7b487aee8a96fab03 (patch) | |
tree | 0c0329a59cbb66b1e4ea4983cd034dc9015245dc /src/responder/ssh | |
parent | 95e94691178297f2b8225a83d43ae388cab04b45 (diff) | |
download | sssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.gz sssd-0232747f04b650796db56fd7b487aee8a96fab03.tar.xz sssd-0232747f04b650796db56fd7b487aee8a96fab03.zip |
Add function get_next_domain()
Use this function instead of explicitly calling domain->next
This function allows to get the next primary domain or to descend into the
subdomains and replaces also get_next_dom_or_subdom()
Diffstat (limited to 'src/responder/ssh')
-rw-r--r-- | src/responder/ssh/sshsrv_cmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c index f83c136b8..e0ce3c9bc 100644 --- a/src/responder/ssh/sshsrv_cmd.c +++ b/src/responder/ssh/sshsrv_cmd.c @@ -173,7 +173,7 @@ ssh_user_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx) /* if it is a domainless search, skip domains that require fully * qualified names instead */ while (cmd_ctx->domain && cmd_ctx->check_next && cmd_ctx->domain->fqnames) { - cmd_ctx->domain = cmd_ctx->domain->next; + cmd_ctx->domain = get_next_domain(cmd_ctx->domain, false); } if (!cmd_ctx->domain) { @@ -250,7 +250,7 @@ ssh_user_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx) if (!res->count) { /* if a multidomain search, try with next */ if (cmd_ctx->check_next) { - cmd_ctx->domain = cmd_ctx->domain->next; + cmd_ctx->domain = get_next_domain(cmd_ctx->domain, false); return ssh_user_pubkeys_search(cmd_ctx); } @@ -303,7 +303,7 @@ ssh_host_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx) /* if it is a domainless search, skip domains that require fully * qualified names instead */ while (cmd_ctx->domain && cmd_ctx->check_next && cmd_ctx->domain->fqnames) { - cmd_ctx->domain = cmd_ctx->domain->next; + cmd_ctx->domain = get_next_domain(cmd_ctx->domain, false); } if (!cmd_ctx->domain) { @@ -375,7 +375,7 @@ ssh_host_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx) if (ret == ENOENT) { /* if a multidomain search, try with next */ if (cmd_ctx->check_next) { - cmd_ctx->domain = cmd_ctx->domain->next; + cmd_ctx->domain = get_next_domain(cmd_ctx->domain, false); return ssh_host_pubkeys_search(cmd_ctx); } @@ -598,7 +598,7 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx) goto done; } - for (; dom; dom = dom->next) { + for (; dom; dom = get_next_domain(dom, false)) { sysdb = dom->sysdb; if (sysdb == NULL) { DEBUG(SSSDBG_FATAL_FAILURE, |