aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-02 01:01:40 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-02 01:01:40 +0100
commit4b061461d3f5cb62a6f384d80fd5a3f6be51bd25 (patch)
treeffa1a9867cb789d2db4d251ba421128ffb13ccf5
parent40e7d25aca1abbe080e00e2bed64b444a5ec7858 (diff)
downloadbusybox-w32-4b061461d3f5cb62a6f384d80fd5a3f6be51bd25.tar.gz
busybox-w32-4b061461d3f5cb62a6f384d80fd5a3f6be51bd25.tar.bz2
busybox-w32-4b061461d3f5cb62a6f384d80fd5a3f6be51bd25.zip
tftpd: fix file creation with bogus mode. Closes bug 1021.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/tftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 8d6038853..b2c3c033c 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -308,7 +308,7 @@ static int tftp_protocol(
308 308
309 if (!ENABLE_TFTP || our_lsa) { /* tftpd */ 309 if (!ENABLE_TFTP || our_lsa) { /* tftpd */
310 /* Open file (must be after changing user) */ 310 /* Open file (must be after changing user) */
311 local_fd = open(local_file, open_mode); 311 local_fd = open(local_file, open_mode, 0666);
312 if (local_fd < 0) { 312 if (local_fd < 0) {
313 error_pkt_reason = ERR_NOFILE; 313 error_pkt_reason = ERR_NOFILE;
314 strcpy((char*)error_pkt_str, "can't open file"); 314 strcpy((char*)error_pkt_str, "can't open file");