summaryrefslogtreecommitdiff
path: root/src/responder/ssh
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2012-11-22 18:04:30 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-10 19:08:19 +0100
commitbb969edb07119ed54c636e5d80ccbed68e2acd39 (patch)
tree2250911f4c43175ae4a8c85b914bd34ad159bf29 /src/responder/ssh
parent9579839a00493830c10a856ad1f5e035b6fa3b45 (diff)
downloadsssd-bb969edb07119ed54c636e5d80ccbed68e2acd39.tar.gz
sssd-bb969edb07119ed54c636e5d80ccbed68e2acd39.tar.bz2
sssd-bb969edb07119ed54c636e5d80ccbed68e2acd39.zip
SSH: Reject requests for authorized keys of root
https://fedorahosted.org/sssd/ticket/1687
Diffstat (limited to 'src/responder/ssh')
-rw-r--r--src/responder/ssh/sshsrv_cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c
index 7de523fa..687e8887 100644
--- a/src/responder/ssh/sshsrv_cmd.c
+++ b/src/responder/ssh/sshsrv_cmd.c
@@ -65,6 +65,11 @@ sss_ssh_cmd_get_user_pubkeys(struct cli_ctx *cctx)
("Requesting SSH user public keys for [%s] from [%s]\n",
cmd_ctx->name, cmd_ctx->domname ? cmd_ctx->domname : "<ALL>"));
+ if (strcmp(cmd_ctx->name, "root") == 0) {
+ ret = ENOENT;
+ goto done;
+ }
+
if (cmd_ctx->domname) {
cmd_ctx->domain = responder_get_domain(cmd_ctx, cctx->rctx,
cmd_ctx->domname);