diff options
Diffstat (limited to 'meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch')
-rw-r--r-- | meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch b/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch new file mode 100644 index 000000000..7ae1a8722 --- /dev/null +++ b/meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Patch originally from Fedora | ||
2 | |||
3 | http://pkgs.fedoraproject.org/cgit/tftp.git/ | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | diff -up tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes tftp-hpa-0.49/tftpd/tftpd.c | ||
8 | --- tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes 2009-01-15 15:28:50.000000000 +0100 | ||
9 | +++ tftp-hpa-0.49/tftpd/tftpd.c 2009-01-15 15:31:36.000000000 +0100 | ||
10 | @@ -932,7 +932,10 @@ int main(int argc, char **argv) | ||
11 | exit(EX_OSERR); | ||
12 | } | ||
13 | #ifdef __CYGWIN__ | ||
14 | - chdir("/"); /* Cygwin chroot() bug workaround */ | ||
15 | + if (chdir("/") < 0) { /* Cygwin chroot() bug workaround */ | ||
16 | + syslog(LOG_ERR, "chroot: %m"); | ||
17 | + exit(EX_OSERR); | ||
18 | + } | ||
19 | #endif | ||
20 | } | ||
21 | #ifdef HAVE_SETREGID | ||