projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0687a5b
)
tftpd: chroot to DIR, not merely chdir. Closes 4874
author
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 7 Mar 2012 23:28:52 +0000
(
00:28
+0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 7 Mar 2012 23:28:52 +0000
(
00:28
+0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/tftp.c
patch
|
blob
|
history
diff --git
a/networking/tftp.c
b/networking/tftp.c
index 043b879af45cb1925235777699255db3ec8bb9af..ce48a1edd5f5089f5a68ea3467c9b5d8f59465c9 100644
(file)
--- a/
networking/tftp.c
+++ b/
networking/tftp.c
@@
-789,8
+789,9
@@
int tftpd_main(int argc UNUSED_PARAM, char **argv)
openlog(applet_name, LOG_PID, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
}
- if (argv[0])
- xchdir(argv[0]);
+ if (argv[0]) {
+ xchroot(argv[0]);
+ }
result = recv_from_to(STDIN_FILENO, block_buf, sizeof(block_buf),
0 /* flags */,