Skip to content

Commit

Permalink
ssh: do not use default_domain_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
sumit-bose committed Oct 4, 2024
1 parent b4bca98 commit 540d9ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/responder/ssh/ssh_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ static errno_t ssh_cmd_get_user_pubkeys(struct cli_ctx *cli_ctx)

cmd_ctx->cli_ctx = cli_ctx;

ret = ssh_protocol_parse_user(cli_ctx, cli_ctx->rctx->default_domain,
&cmd_ctx->name, &cmd_ctx->domain);
ret = ssh_protocol_parse_user(cli_ctx, &cmd_ctx->name, &cmd_ctx->domain);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, "Invalid request message!\n");
goto done;
Expand Down
1 change: 0 additions & 1 deletion src/responder/ssh/ssh_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ struct sss_cmd_table *get_ssh_cmds(void);

errno_t
ssh_protocol_parse_user(struct cli_ctx *cli_ctx,
const char *default_domain,
const char **_name,
const char **_domain);

Expand Down
9 changes: 2 additions & 7 deletions src/responder/ssh/ssh_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ static void got_ssh_keys(struct tevent_req *req)

static errno_t
ssh_protocol_parse_request(struct cli_ctx *cli_ctx,
const char *default_domain,
const char **_name,
const char **_alias,
const char **_domain)
Expand Down Expand Up @@ -209,8 +208,6 @@ ssh_protocol_parse_request(struct cli_ctx *cli_ctx,
return EINVAL;
}
c += domain_len;
} else {
domain = default_domain;
}

DEBUG(SSSDBG_TRACE_FUNC,
Expand All @@ -234,12 +231,10 @@ ssh_protocol_parse_request(struct cli_ctx *cli_ctx,

errno_t
ssh_protocol_parse_user(struct cli_ctx *cli_ctx,
const char *default_domain,
const char **_name,
const char **_domain)
{
return ssh_protocol_parse_request(cli_ctx, default_domain,
_name, NULL, _domain);
return ssh_protocol_parse_request(cli_ctx, _name, NULL, _domain);
}

errno_t
Expand All @@ -248,5 +243,5 @@ ssh_protocol_parse_host(struct cli_ctx *cli_ctx,
const char **_alias,
const char **_domain)
{
return ssh_protocol_parse_request(cli_ctx, NULL, _name, _alias, _domain);
return ssh_protocol_parse_request(cli_ctx, _name, _alias, _domain);
}

0 comments on commit 540d9ce

Please sign in to comment.