diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2005-08-28 16:22:42 +0000 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2005-08-28 16:22:42 +0000 |
commit | dc0c5c4cfeefae2abc41d2475ed69e8fa26af1ee (patch) | |
tree | ace40eae799ba4d63692b69449d5ca7f3329432e /sftp_server/main.c | |
parent | c76e6e496d6065b8cb61c5ea25df6a38619cfdf4 (diff) | |
download | libssh-dc0c5c4cfeefae2abc41d2475ed69e8fa26af1ee.tar.gz libssh-dc0c5c4cfeefae2abc41d2475ed69e8fa26af1ee.tar.xz libssh-dc0c5c4cfeefae2abc41d2475ed69e8fa26af1ee.zip |
the whole libconfig + my development tree for ACL/ config
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@20 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'sftp_server/main.c')
-rw-r--r-- | sftp_server/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sftp_server/main.c b/sftp_server/main.c index 19e7b864..817f89a3 100644 --- a/sftp_server/main.c +++ b/sftp_server/main.c @@ -1,7 +1,7 @@ -/* sshd.c */ -/* yet another ssh daemon (Yawn!) */ +/* main.c */ +/* Core of the sftp server */ /* -Copyright 2004 Aris Adamantiadis +Copyright 2005 Aris Adamantiadis This file is part of the SSH Library @@ -33,6 +33,7 @@ MA 02111-1307, USA. */ #include <errno.h> #include <fcntl.h> #include <stdio.h> +#include "server.h" #define TYPE_DIR 1 #define TYPE_FILE 1 @@ -201,7 +202,7 @@ int handle_readdir(SFTP_CLIENT_MESSAGE *msg){ sftp_reply_status(msg,SSH_FX_BAD_MESSAGE,"invalid handle"); return 0; } - for(i=0; !handle->eof && i<10;++i){ + for(i=0; !handle->eof && i<50;++i){ dir=readdir(handle->dir); if(!dir){ handle->eof=1; @@ -472,6 +473,7 @@ int main(int argc, char **argv){ CHANNEL *chan=NULL; SFTP_SESSION *sftp=NULL; ssh_options_getopt(options,&argc,argv); + parse_config("sftp.conf"); ssh_options_set_dsa_server_key(options,"/etc/ssh/ssh_host_dsa_key"); ssh_options_set_rsa_server_key(options,"/etc/ssh/ssh_host_rsa_key"); ssh_bind=ssh_bind_new(); |