libbb: make xchroot do a chdir("/") after chroot
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -1179,8 +1179,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv)
|
||||
#endif
|
||||
|
||||
if (argv[optind]) {
|
||||
xchdir(argv[optind]);
|
||||
chroot(".");
|
||||
xchroot(argv[optind]);
|
||||
}
|
||||
|
||||
//umask(077); - admin can set umask before starting us
|
||||
|
Reference in New Issue
Block a user