version 1.227, 2008/02/10 10:54:29 |
version 1.228, 2008/02/13 22:38:17 |
|
|
#include <kafs.h> |
#include <kafs.h> |
#endif |
#endif |
|
|
/* Magic name for internal sftp-server */ |
|
#define INTERNAL_SFTP_NAME "internal-sftp" |
|
|
|
/* func */ |
/* func */ |
|
|
Session *session_new(void); |
Session *session_new(void); |
|
|
if (dup2(err[0], 2) < 0) /* stderr */ |
if (dup2(err[0], 2) < 0) /* stderr */ |
perror("dup2 stderr"); |
perror("dup2 stderr"); |
|
|
|
closefrom(STDERR_FILENO + 1); |
|
|
/* Do processing for the child (exec command etc). */ |
/* Do processing for the child (exec command etc). */ |
do_child(s, command); |
do_child(s, command); |
/* NOTREACHED */ |
/* NOTREACHED */ |
|
|
/* record login, etc. similar to login(1) */ |
/* record login, etc. similar to login(1) */ |
if (!(options.use_login && command == NULL)) |
if (!(options.use_login && command == NULL)) |
do_login(s, command); |
do_login(s, command); |
|
|
|
closefrom(STDERR_FILENO + 1); |
|
|
/* Do common processing for the child, such as execing the command. */ |
/* Do common processing for the child, such as execing the command. */ |
do_child(s, command); |
do_child(s, command); |