tftpd.c:validate_access was changed so that the file stat was not called. The comment indicates that this was done so that it wouldn't report ENOENT in write mode which is the correct behaviour. Unfortunately, this meant that the code would fall through and return an EUNDEF when doing a read for a non-existant file.
I've attached a patch to fix where the stat is re-enabled but only returns an ENOENT if the mode is not Write, ie, Read.
G'day,
tftpd.c: validate_ access was changed so that the file stat was not called. The comment indicates that this was done so that it wouldn't report ENOENT in write mode which is the correct behaviour. Unfortunately, this meant that the code would fall through and return an EUNDEF when doing a read for a non-existant file.
I've attached a patch to fix where the stat is re-enabled but only returns an ENOENT if the mode is not Write, ie, Read.
Please let me know if I can help further.
Cheers,
Jerry