summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ssh/authpasswd.c
diff options
context:
space:
mode:
authorkhm <devnull@localhost>2017-01-12 16:36:38 -0800
committerkhm <devnull@localhost>2017-01-12 16:36:38 -0800
commitdc8c7bf2b73d608ac2483aee303a51a3507b4c5a (patch)
treef8c69dbf5f36de6f9acea724f2068054b5b8e7a6 /sys/src/cmd/ssh/authpasswd.c
parentcb1555c7d741fa482c339aa9ac8a44753e2ad296 (diff)
ssh: R.I.P.
Diffstat (limited to 'sys/src/cmd/ssh/authpasswd.c')
-rw-r--r--sys/src/cmd/ssh/authpasswd.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/sys/src/cmd/ssh/authpasswd.c b/sys/src/cmd/ssh/authpasswd.c
deleted file mode 100644
index 2d2b21fd7..000000000
--- a/sys/src/cmd/ssh/authpasswd.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "ssh.h"
-
-static int
-authpasswordfn(Conn *c)
-{
- Msg *m;
- UserPasswd *up;
-
- up = auth_getuserpasswd(c->interactive ? auth_getkey : nil, "proto=pass service=ssh server=%q user=%q", c->host, c->user);
- if(up == nil){
- debug(DBG_AUTH, "getuserpasswd returned nothing (interactive=%d)\n", c->interactive);
- return -1;
- }
-
- debug(DBG_AUTH, "try using password from factotum\n");
- m = allocmsg(c, SSH_CMSG_AUTH_PASSWORD, 4+strlen(up->passwd));
- putstring(m, up->passwd);
- sendmsg(m);
-
- m = recvmsg(c, -1);
- switch(m->type){
- default:
- badmsg(m, 0);
- case SSH_SMSG_SUCCESS:
- free(m);
- return 0;
- case SSH_SMSG_FAILURE:
- free(m);
- return -1;
- }
-}
-
-Auth authpassword =
-{
- SSH_AUTH_PASSWORD,
- "password",
- authpasswordfn,
-};