Hide home directory when chrooted or guest. From Ake Holmlund
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25129 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -129,6 +129,7 @@ extern struct sockaddr *data_dest;
|
||||
extern int logged_in;
|
||||
extern struct passwd *pw;
|
||||
extern int guest;
|
||||
extern int dochroot;
|
||||
extern int logging;
|
||||
extern int type;
|
||||
extern off_t file_size;
|
||||
|
@@ -352,8 +352,12 @@ cmd
|
||||
}
|
||||
| CWD CRLF check_login
|
||||
{
|
||||
if ($3)
|
||||
cwd(pw->pw_dir);
|
||||
if ($3) {
|
||||
const char *path = pw->pw_dir;
|
||||
if (dochroot || guest)
|
||||
path = "/";
|
||||
cwd(path);
|
||||
}
|
||||
}
|
||||
| CWD SP pathname CRLF check_login
|
||||
{
|
||||
|
@@ -73,8 +73,6 @@ RCSID("$Id$");
|
||||
static int *pids;
|
||||
static int fds;
|
||||
|
||||
extern int dochroot;
|
||||
|
||||
/* return path prepended with ~ftp if that file exists, otherwise
|
||||
* return path unchanged
|
||||
*/
|
||||
|
Reference in New Issue
Block a user