diff --git a/atftp/atftp.spec b/atftp/atftp.spec index ca6028c..4f7488f 100644 --- a/atftp/atftp.spec +++ b/atftp/atftp.spec @@ -2,7 +2,7 @@ Name: atftp Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP server Group: System Environment/Daemons Version: 0.7 -Release: 5 +Release: 6 License: GPL Vendor: Linux Networx Inc. Source: atftp_0.7.dfsg.orig.tar.gz @@ -10,6 +10,7 @@ Source1: tftpd Patch: atftp_0.7.dfsg-3.diff Patch1: dfsg-3-to-multicast.diff Patch2: dfsg-3-bigfiles.diff +Patch3: dfsg-3-to-winpaths.diff Buildroot: /var/tmp/atftp-buildroot Packager: Allen Reese Conflicts: tftp-server @@ -38,6 +39,7 @@ files using the TFTP protocol. %patch -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build diff --git a/atftp/dfsg-3-to-winpaths.diff b/atftp/dfsg-3-to-winpaths.diff new file mode 100644 index 0000000..75b68e2 --- /dev/null +++ b/atftp/dfsg-3-to-winpaths.diff @@ -0,0 +1,32 @@ +diff -urN atftp-0.7.dfsg/tftpd_file.c atftp-0.7.dfsg-winpaths/tftpd_file.c +--- atftp-0.7.dfsg/tftpd_file.c 2008-06-20 10:33:43.000000000 -0400 ++++ atftp-0.7.dfsg-winpaths/tftpd_file.c 2008-06-20 10:39:51.000000000 -0400 +@@ -474,6 +474,28 @@ + /* verify that the requested file exist */ + fp = fopen(filename, "r"); + ++ /* if it didn't exist, consider the possibilty of Windows */ ++ if (fp == NULL) ++ { ++ char* idx; ++ idx = strchr(filename,'\\'); ++ while (idx) { ++ (*idx) = '/'; ++ idx = strchr(filename,'\\'); ++ } ++ if (strstr(filename,"/Boot/BCD")) ++ { ++ char bcdfilename[MAXLEN]; ++ strncpy(bcdfilename,filename,MAXLEN); ++ strncat(bcdfilename,".",MAXLEN); ++ strncat(bcdfilename,inet_ntoa(sa->sin_addr),MAXLEN); ++ fp = fopen(bcdfilename, "r"); ++ } ++ if (fp == NULL) ++ { ++ fp = fopen(filename,"r"); ++ } ++ } + #ifdef HAVE_PCRE + if (fp == NULL) + {