tftpd: fix file creation with bogus mode. Closes bug 1021.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -308,7 +308,7 @@ static int tftp_protocol(
|
|||||||
|
|
||||||
if (!ENABLE_TFTP || our_lsa) { /* tftpd */
|
if (!ENABLE_TFTP || our_lsa) { /* tftpd */
|
||||||
/* Open file (must be after changing user) */
|
/* Open file (must be after changing user) */
|
||||||
local_fd = open(local_file, open_mode);
|
local_fd = open(local_file, open_mode, 0666);
|
||||||
if (local_fd < 0) {
|
if (local_fd < 0) {
|
||||||
error_pkt_reason = ERR_NOFILE;
|
error_pkt_reason = ERR_NOFILE;
|
||||||
strcpy((char*)error_pkt_str, "can't open file");
|
strcpy((char*)error_pkt_str, "can't open file");
|
||||||
|
|||||||
Reference in New Issue
Block a user