meta-openembedded/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
Paul Eggleton 2abab0e93d tftp-hpa: add from OE-Classic, update and tidy up
* Update to 5.2
* Add patches from Fedora
* Add DESCRIPTION and better SUMMARY
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* Update ALTERNATIVE_* definitions
* Handle hardcoded paths in initscript

Much of this was done by Joe MacDonald <joe.macdonald@windriver.com>.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-11-27 14:43:58 -05:00

22 lines
680 B
Diff

Patch originally from Fedora
http://pkgs.fedoraproject.org/cgit/tftp.git/
Upstream-Status: Pending
diff -up tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes tftp-hpa-0.49/tftpd/tftpd.c
--- tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes 2009-01-15 15:28:50.000000000 +0100
+++ tftp-hpa-0.49/tftpd/tftpd.c 2009-01-15 15:31:36.000000000 +0100
@@ -932,7 +932,10 @@ int main(int argc, char **argv)
exit(EX_OSERR);
}
#ifdef __CYGWIN__
- chdir("/"); /* Cygwin chroot() bug workaround */
+ if (chdir("/") < 0) { /* Cygwin chroot() bug workaround */
+ syslog(LOG_ERR, "chroot: %m");
+ exit(EX_OSERR);
+ }
#endif
}
#ifdef HAVE_SETREGID