forked from pool/atftp
This commit is contained in:
parent
339300bf98
commit
9d51b3b66e
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 3 15:57:09 CEST 2008 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- added atftpd-0.7_unprotected_assignments_crash.patch: (bnc#291884)
|
||||||
|
under high load atftpd dies as data access wasnt always protected
|
||||||
|
with a mutex.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 21 15:37:53 CEST 2007 - adrian@suse.de
|
Thu Jun 21 15:37:53 CEST 2007 - adrian@suse.de
|
||||||
|
|
||||||
|
77
atftp.spec
77
atftp.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package atftp (Version 0.7.0)
|
# spec file for package atftp (Version 0.7.0)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
# package are under the same license as the package itself.
|
# package are under the same license as the package itself.
|
||||||
#
|
#
|
||||||
@ -10,17 +10,18 @@
|
|||||||
|
|
||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
|
|
||||||
Name: atftp
|
Name: atftp
|
||||||
%define pkg_version 0.7
|
%define pkg_version 0.7
|
||||||
Version: 0.7.0
|
Version: 0.7.0
|
||||||
Release: 48
|
Release: 96
|
||||||
License: GNU General Public License (GPL)
|
License: GPL v2 or later
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: readline-devel tcpd-devel
|
BuildRequires: readline-devel tcpd-devel
|
||||||
PreReq: %insserv_prereq %fillup_prereq
|
PreReq: %insserv_prereq %fillup_prereq
|
||||||
Conflicts: tftp
|
Conflicts: tftp
|
||||||
URL: ftp://ftp.mamalinux.com/pub/atftp/
|
Url: ftp://ftp.mamalinux.com/pub/atftp/
|
||||||
Source: %{name}-%{pkg_version}.tar.bz2
|
Source: %{name}-%{pkg_version}.tar.bz2
|
||||||
Source1: atftpd.init.d
|
Source1: atftpd.init.d
|
||||||
Source2: atftpd.sysconfig
|
Source2: atftpd.sysconfig
|
||||||
@ -30,6 +31,7 @@ Patch3: atftp-0.7_compiler_warnings.patch
|
|||||||
Patch4: atftp-0.7_thread_crash.patch
|
Patch4: atftp-0.7_thread_crash.patch
|
||||||
Patch5: atftp-0.7_sol_ip.patch
|
Patch5: atftp-0.7_sol_ip.patch
|
||||||
Patch6: atftp-0.7_bug-213384_OPT_NUMBER.patch
|
Patch6: atftp-0.7_bug-213384_OPT_NUMBER.patch
|
||||||
|
Patch7: atftpd-0.7_unprotected_assignments_crash.patch
|
||||||
#
|
#
|
||||||
Summary: Advanced TFTP Server and Client
|
Summary: Advanced TFTP Server and Client
|
||||||
|
|
||||||
@ -57,6 +59,7 @@ Authors:
|
|||||||
%patch4
|
%patch4
|
||||||
%patch5
|
%patch5
|
||||||
%patch6
|
%patch6
|
||||||
|
%patch7
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
@ -99,13 +102,17 @@ autoreconf -fi
|
|||||||
%dir %attr(-,nobody,nogroup) /var/run/atftpd/
|
%dir %attr(-,nobody,nogroup) /var/run/atftpd/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Jun 21 2007 - adrian@suse.de
|
* Thu Apr 03 2008 mrueckert@suse.de
|
||||||
|
- added atftpd-0.7_unprotected_assignments_crash.patch: (bnc#291884)
|
||||||
|
under high load atftpd dies as data access wasnt always protected
|
||||||
|
with a mutex.
|
||||||
|
* Thu Jun 21 2007 adrian@suse.de
|
||||||
- fix changelog entry order
|
- fix changelog entry order
|
||||||
* Mon Jan 22 2007 - mrueckert@suse.de
|
* Mon Jan 22 2007 mrueckert@suse.de
|
||||||
- added atftp-0.7_bug-213384_OPT_NUMBER.patch:
|
- added atftp-0.7_bug-213384_OPT_NUMBER.patch:
|
||||||
"atftpd incorrectly sends OACK (option acknowledge) packets"
|
"atftpd incorrectly sends OACK (option acknowledge) packets"
|
||||||
(#213384,#80441)
|
(#213384,#80441)
|
||||||
* Mon Jul 31 2006 - mrueckert@suse.de
|
* Mon Jul 31 2006 mrueckert@suse.de
|
||||||
- added /var/run/atftpd/ (0755,nobody,nogroup):
|
- added /var/run/atftpd/ (0755,nobody,nogroup):
|
||||||
at ftp can finally create pid files
|
at ftp can finally create pid files
|
||||||
the default pid file for a single instance will be
|
the default pid file for a single instance will be
|
||||||
@ -115,12 +122,12 @@ autoreconf -fi
|
|||||||
* new sysconfig variable ATFTPD_BIND_ADDRESSES: whitespace
|
* new sysconfig variable ATFTPD_BIND_ADDRESSES: whitespace
|
||||||
seperated list of ip addresses.
|
seperated list of ip addresses.
|
||||||
* each instance has its own pid file /var/run/atftpd/$ip.pid
|
* each instance has its own pid file /var/run/atftpd/$ip.pid
|
||||||
* Sat Jul 01 2006 - mrueckert@suse.de
|
* Sat Jul 01 2006 mrueckert@suse.de
|
||||||
- bump the version number to 0.7.0:
|
- bump the version number to 0.7.0:
|
||||||
This fix is needed because 0.7 < 0.7cvs. Replaced %%{version}
|
This fix is needed because 0.7 < 0.7cvs. Replaced %%{version}
|
||||||
with %%{pkg_version} everywhere. %%{pkg_version} holds the original
|
with %%{pkg_version} everywhere. %%{pkg_version} holds the original
|
||||||
value of 0.7.
|
value of 0.7.
|
||||||
* Thu Mar 30 2006 - mrueckert@suse.de
|
* Thu Mar 30 2006 mrueckert@suse.de
|
||||||
- added atftp-0.7_compiler_warnings.patch:
|
- added atftp-0.7_compiler_warnings.patch:
|
||||||
o missing include of pthread.h
|
o missing include of pthread.h
|
||||||
o make the the 1st parameter of tftp_mtftp_missed_packet
|
o make the the 1st parameter of tftp_mtftp_missed_packet
|
||||||
@ -134,32 +141,32 @@ autoreconf -fi
|
|||||||
- updated atftp-0.7.dif:
|
- updated atftp-0.7.dif:
|
||||||
o really always run through the whole bitmap to find old holes.
|
o really always run through the whole bitmap to find old holes.
|
||||||
(bug #148779, #65660)
|
(bug #148779, #65660)
|
||||||
* Wed Jan 25 2006 - mls@suse.de
|
* Wed Jan 25 2006 mls@suse.de
|
||||||
- converted neededforbuild to BuildRequires
|
- converted neededforbuild to BuildRequires
|
||||||
* Tue Dec 20 2005 - ro@suse.de
|
* Tue Dec 20 2005 ro@suse.de
|
||||||
- define CLK_TCK if not already done
|
- define CLK_TCK if not already done
|
||||||
* Thu Mar 03 2005 - nashif@suse.de
|
* Thu Mar 03 2005 nashif@suse.de
|
||||||
- Applied patch from #65660: transfer breaks down if packets get
|
- Applied patch from #65660: transfer breaks down if packets get
|
||||||
dropped
|
dropped
|
||||||
* Thu Mar 03 2005 - nashif@suse.de
|
* Thu Mar 03 2005 nashif@suse.de
|
||||||
- According to #65660 memory allocation issue not present anymore
|
- According to #65660 memory allocation issue not present anymore
|
||||||
* Sun Feb 13 2005 - nashif@suse.de
|
* Sun Feb 13 2005 nashif@suse.de
|
||||||
- fixed segfault on x86_64
|
- fixed segfault on x86_64
|
||||||
* Tue Nov 16 2004 - ro@suse.de
|
* Tue Nov 16 2004 ro@suse.de
|
||||||
- merge old changelog entries (after checking all fixes are here)
|
- merge old changelog entries (after checking all fixes are here)
|
||||||
- removed also destdir.patch (included upstream)
|
- removed also destdir.patch (included upstream)
|
||||||
* Fri Nov 12 2004 - jhargado@suse.de
|
* Fri Nov 12 2004 jhargado@suse.de
|
||||||
- Added a patch to fix a problem where if a client requests a file
|
- Added a patch to fix a problem where if a client requests a file
|
||||||
that doesn't exist, sometimes the daemon would exit without warning.
|
that doesn't exist, sometimes the daemon would exit without warning.
|
||||||
The .7 version of atftp is needed in SLRS to allow HA functionality.
|
The .7 version of atftp is needed in SLRS to allow HA functionality.
|
||||||
This package is only included in the SLRS distribution.
|
This package is only included in the SLRS distribution.
|
||||||
* Sat Sep 11 2004 - kukuk@suse.de
|
* Sat Sep 11 2004 kukuk@suse.de
|
||||||
- Adjust to new glibc __THROW define
|
- Adjust to new glibc __THROW define
|
||||||
* Mon Apr 12 2004 - nashif@suse.de
|
* Mon Apr 12 2004 nashif@suse.de
|
||||||
- update to 0.7 final
|
- update to 0.7 final
|
||||||
- when called in batch mode, return right exit code if
|
- when called in batch mode, return right exit code if
|
||||||
operation fails.
|
operation fails.
|
||||||
* Tue Mar 09 2004 - ms@suse.de
|
* Tue Mar 09 2004 ms@suse.de
|
||||||
- include timeout patch:
|
- include timeout patch:
|
||||||
We finally got a network trace with
|
We finally got a network trace with
|
||||||
the ACKs included. When the client fails the checksum, it stops acking
|
the ACKs included. When the client fails the checksum, it stops acking
|
||||||
@ -176,42 +183,42 @@ autoreconf -fi
|
|||||||
download), we noticed the server code has the same timeout scheme so Dan
|
download), we noticed the server code has the same timeout scheme so Dan
|
||||||
also added this code to reset the timeout counter when good packets were
|
also added this code to reset the timeout counter when good packets were
|
||||||
received. These fixes look solid, even under error conditions.
|
received. These fixes look solid, even under error conditions.
|
||||||
* Mon Mar 01 2004 - nashif@suse.de
|
* Mon Mar 01 2004 nashif@suse.de
|
||||||
- Update to 0.7 cvs
|
- Update to 0.7 cvs
|
||||||
* Thu Feb 19 2004 - kukuk@suse.de
|
* Thu Feb 19 2004 kukuk@suse.de
|
||||||
- Cleanup neededforbuild
|
- Cleanup neededforbuild
|
||||||
* Wed Feb 04 2004 - ms@suse.de
|
* Wed Feb 04 2004 ms@suse.de
|
||||||
- according to Anas Nashif <nashif@suse.de> the current version
|
- according to Anas Nashif <nashif@suse.de> the current version
|
||||||
0.6.2 includes the fix for bug (#27341). buffer overflow when a long
|
0.6.2 includes the fix for bug (#27341). buffer overflow when a long
|
||||||
filename is sent to the server
|
filename is sent to the server
|
||||||
* Wed Feb 04 2004 - ms@suse.de
|
* Wed Feb 04 2004 ms@suse.de
|
||||||
- include version 0.6.2 to SLES8 includes important multicast
|
- include version 0.6.2 to SLES8 includes important multicast
|
||||||
fixes related to project Point-of-Sale (#34074)
|
fixes related to project Point-of-Sale (#34074)
|
||||||
* Sat Jan 10 2004 - adrian@suse.de
|
* Sat Jan 10 2004 adrian@suse.de
|
||||||
- build as user
|
- build as user
|
||||||
* Fri Aug 29 2003 - nashif@suse.de
|
* Fri Aug 29 2003 nashif@suse.de
|
||||||
- Provide default tftp directory
|
- Provide default tftp directory
|
||||||
* Fri Aug 01 2003 - nashif@suse.de
|
* Fri Aug 01 2003 nashif@suse.de
|
||||||
- update to 0.6.2
|
- update to 0.6.2
|
||||||
- Fixes bug #27341
|
- Fixes bug #27341
|
||||||
- Readded conflict to tftp
|
- Readded conflict to tftp
|
||||||
* Wed May 28 2003 - nashif@suse.de
|
* Wed May 28 2003 nashif@suse.de
|
||||||
- Removed conflict to tftp
|
- Removed conflict to tftp
|
||||||
- added manpages as doc files
|
- added manpages as doc files
|
||||||
* Mon May 26 2003 - lmuelle@suse.de
|
* Mon May 26 2003 lmuelle@suse.de
|
||||||
- Remove set -e from init script; exit with rc 5 if binary is not installed
|
- Remove set -e from init script; exit with rc 5 if binary is not installed
|
||||||
* Wed Jan 01 2003 - nashif@suse.de
|
* Wed Jan 01 2003 nashif@suse.de
|
||||||
- Fixed bug #22614: missing metadata in sysconfig template
|
- Fixed bug #22614: missing metadata in sysconfig template
|
||||||
* Sat Sep 14 2002 - nashif@suse.de
|
* Sat Sep 14 2002 nashif@suse.de
|
||||||
- Added missing restart to init script
|
- Added missing restart to init script
|
||||||
* Fri Aug 30 2002 - nashif@suse.de
|
* Fri Aug 30 2002 nashif@suse.de
|
||||||
- Fixed bug #18661: Removed ; from sysconfig file
|
- Fixed bug #18661: Removed ; from sysconfig file
|
||||||
* Sat Aug 17 2002 - nashif@suse.de
|
* Sat Aug 17 2002 nashif@suse.de
|
||||||
- Fixed bug #17793: Added PreReq
|
- Fixed bug #17793: Added PreReq
|
||||||
- Fixed init script output
|
- Fixed init script output
|
||||||
* Sun Jun 09 2002 - nashif@suse.de
|
* Sun Jun 09 2002 nashif@suse.de
|
||||||
- Update to version 0.6.1.1
|
- Update to version 0.6.1.1
|
||||||
* Sat Apr 13 2002 - nashif@suse.de
|
* Sat Apr 13 2002 nashif@suse.de
|
||||||
- Use tftp_LDADD for libraries instead of LDFLAGS
|
- Use tftp_LDADD for libraries instead of LDFLAGS
|
||||||
* Sat Mar 23 2002 - nashif@suse.de
|
* Sat Mar 23 2002 nashif@suse.de
|
||||||
- Initial release (0.50)
|
- Initial release (0.50)
|
||||||
|
145
atftpd-0.7_unprotected_assignments_crash.patch
Normal file
145
atftpd-0.7_unprotected_assignments_crash.patch
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
Index: tftpd_list.c
|
||||||
|
===================================================================
|
||||||
|
--- tftpd_list.c.orig 2007-09-18 18:14:46.182187192 +0200
|
||||||
|
+++ tftpd_list.c 2007-09-18 18:19:50.072480431 +0200
|
||||||
|
@@ -49,11 +49,11 @@ pthread_mutex_t thread_list_mutex = PTHR
|
||||||
|
*/
|
||||||
|
int tftpd_list_add(struct thread_data *new)
|
||||||
|
{
|
||||||
|
- struct thread_data *current = thread_data;
|
||||||
|
+ struct thread_data *current;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread_list_mutex);
|
||||||
|
-
|
||||||
|
+ current = thread_data;
|
||||||
|
number_of_thread++;
|
||||||
|
|
||||||
|
ret = number_of_thread;
|
||||||
|
@@ -81,11 +81,13 @@ int tftpd_list_add(struct thread_data *n
|
||||||
|
*/
|
||||||
|
int tftpd_list_remove(struct thread_data *old)
|
||||||
|
{
|
||||||
|
- struct thread_data *current = thread_data;
|
||||||
|
+ struct thread_data *current;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread_list_mutex);
|
||||||
|
|
||||||
|
+ current = thread_data;
|
||||||
|
+
|
||||||
|
number_of_thread--;
|
||||||
|
ret = number_of_thread;
|
||||||
|
|
||||||
|
@@ -137,23 +139,26 @@ int tftpd_list_find_multicast_server_and
|
||||||
|
struct thread_data *data,
|
||||||
|
struct client_info *client)
|
||||||
|
{
|
||||||
|
- struct thread_data *current = thread_data; /* head of the list */
|
||||||
|
- struct tftp_opt *tftp_options = data->tftp_options;
|
||||||
|
+ struct thread_data *current; /* head of the list */
|
||||||
|
+ struct tftp_opt *tftp_options;
|
||||||
|
struct client_info *tmp;
|
||||||
|
char options[MAXLEN];
|
||||||
|
char string[MAXLEN];
|
||||||
|
char *index;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
+ /* lock the whole list before walking it */
|
||||||
|
+ pthread_mutex_lock(&thread_list_mutex);
|
||||||
|
+
|
||||||
|
*thread = NULL;
|
||||||
|
|
||||||
|
+ current = thread_data;
|
||||||
|
+ tftp_options = data->tftp_options;
|
||||||
|
+
|
||||||
|
opt_request_to_string(tftp_options, options, MAXLEN);
|
||||||
|
index = strstr(options, "multicast");
|
||||||
|
len = (size_t)(index - options);
|
||||||
|
|
||||||
|
- /* lock the whole list before walking it */
|
||||||
|
- pthread_mutex_lock(&thread_list_mutex);
|
||||||
|
-
|
||||||
|
while (current)
|
||||||
|
{
|
||||||
|
if (current != data)
|
||||||
|
@@ -215,9 +220,10 @@ inline void tftpd_clientlist_ready(struc
|
||||||
|
void tftpd_clientlist_remove(struct thread_data *thread,
|
||||||
|
struct client_info *client)
|
||||||
|
{
|
||||||
|
- struct client_info *tmp = thread->client_info;
|
||||||
|
+ struct client_info *tmp;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread->client_mutex);
|
||||||
|
+ tmp = thread->client_info;
|
||||||
|
while ((tmp->next != client) && (tmp->next != NULL))
|
||||||
|
tmp = tmp->next;
|
||||||
|
if (tmp->next == NULL)
|
||||||
|
@@ -232,9 +238,11 @@ void tftpd_clientlist_remove(struct thre
|
||||||
|
void tftpd_clientlist_free(struct thread_data *thread)
|
||||||
|
{
|
||||||
|
struct client_info *tmp;
|
||||||
|
- struct client_info *head = thread->client_info;
|
||||||
|
+ struct client_info *head;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread->client_mutex);
|
||||||
|
+ head = thread->client_info;
|
||||||
|
+
|
||||||
|
while (head)
|
||||||
|
{
|
||||||
|
tmp = head;
|
||||||
|
@@ -251,9 +259,10 @@ int tftpd_clientlist_done(struct thread_
|
||||||
|
struct client_info *client,
|
||||||
|
struct sockaddr_in *sock)
|
||||||
|
{
|
||||||
|
- struct client_info *head = thread->client_info;
|
||||||
|
+ struct client_info *head;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread->client_mutex);
|
||||||
|
+ head = thread->client_info;
|
||||||
|
|
||||||
|
if (client)
|
||||||
|
{
|
||||||
|
@@ -335,10 +344,10 @@ int tftpd_clientlist_next(struct thread_
|
||||||
|
|
||||||
|
void tftpd_list_kill_threads(void)
|
||||||
|
{
|
||||||
|
- struct thread_data *current = thread_data; /* head of list */
|
||||||
|
+ struct thread_data *current; /* head of list */
|
||||||
|
|
||||||
|
pthread_mutex_lock(&thread_list_mutex);
|
||||||
|
-
|
||||||
|
+ current = thread_data;
|
||||||
|
|
||||||
|
while (current != NULL)
|
||||||
|
{
|
||||||
|
Index: tftpd_mcast.c
|
||||||
|
===================================================================
|
||||||
|
--- tftpd_mcast.c.orig 2004-03-06 21:41:41.000000000 +0100
|
||||||
|
+++ tftpd_mcast.c 2007-09-18 18:16:54.705925936 +0200
|
||||||
|
@@ -51,9 +51,11 @@ struct tid *tid_list = NULL;
|
||||||
|
*/
|
||||||
|
int tftpd_mcast_get_tid(char **addr, short *port)
|
||||||
|
{
|
||||||
|
- struct tid *current = tid_list;
|
||||||
|
+ struct tid *current;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&mcast_tid_list);
|
||||||
|
+ current = tid_list;
|
||||||
|
+
|
||||||
|
/* walk the list for a free tid */
|
||||||
|
while (current != NULL)
|
||||||
|
{
|
||||||
|
@@ -74,9 +76,11 @@ int tftpd_mcast_get_tid(char **addr, sho
|
||||||
|
|
||||||
|
int tftpd_mcast_free_tid(char *addr, short port)
|
||||||
|
{
|
||||||
|
- struct tid *current = tid_list;
|
||||||
|
+ struct tid *current;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&mcast_tid_list);
|
||||||
|
+ current = tid_list;
|
||||||
|
+
|
||||||
|
while (current != NULL)
|
||||||
|
{
|
||||||
|
if ((current->used == 1) && (current->port == port) &&
|
Loading…
x
Reference in New Issue
Block a user