mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 17:11:45 +00:00
-atfp concessions to Windows clients (\ and BCD uniqueness check)
This commit is contained in:
parent
70e6458047
commit
6aa18b64c1
@ -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 <areese@lnxi.com>
|
||||
Conflicts: tftp-server
|
||||
@ -38,6 +39,7 @@ files using the TFTP protocol.
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
32
atftp/dfsg-3-to-winpaths.diff
Normal file
32
atftp/dfsg-3-to-winpaths.diff
Normal file
@ -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)
|
||||
{
|
Loading…
Reference in New Issue
Block a user