aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2005-08-29 00:55:27 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2005-08-29 00:55:27 +0000
commitb81c66ee8f785d56eea7ebf3c8d741704c4f2b1b (patch)
tree2adfa966f2b303b4adebae2d5727096b31036c0d /libssh
parent0de0dca16d1caf6c712fb4b50d4ff7c7e25d5129 (diff)
downloadlibssh-b81c66ee8f785d56eea7ebf3c8d741704c4f2b1b.tar.gz
libssh-b81c66ee8f785d56eea7ebf3c8d741704c4f2b1b.tar.xz
libssh-b81c66ee8f785d56eea7ebf3c8d741704c4f2b1b.zip
pam samples files to put into /etc/pam.d
ssh_silent_disconnect() and server forking. I still have to add a -D command line to avoid the forking. password auth works, but there is no uid change yet. I'll have to make the configuration stuff really being respected by the server. (like keys, ports, users, ...) git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@23 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/server.c8
-rw-r--r--libssh/session.c6
2 files changed, 14 insertions, 0 deletions
diff --git a/libssh/server.c b/libssh/server.c
index a2d9d48f..066760f0 100644
--- a/libssh/server.c
+++ b/libssh/server.c
@@ -151,6 +151,14 @@ SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind){
session->rsa_key=rsa;
return session;
}
+
+void ssh_bind_free(SSH_BIND *ssh_bind){
+ if(ssh_bind->bindfd>=0)
+ close(ssh_bind->bindfd);
+ ssh_bind->bindfd=-1;
+ free(ssh_bind);
+}
+
extern char *supported_methods[];
int server_set_kex(SSH_SESSION * session) {
diff --git a/libssh/session.c b/libssh/session.c
index 731446d1..1a0f25ce 100644
--- a/libssh/session.c
+++ b/libssh/session.c
@@ -81,6 +81,12 @@ void ssh_cleanup(SSH_SESSION *session){
free(session);
}
+void ssh_silent_disconnect(SSH_SESSION *session){
+ close(session->fd);
+ session->alive=0;
+ ssh_disconnect(session);
+}
+
void ssh_set_options(SSH_SESSION *session, SSH_OPTIONS *options){
session->options=options;
}