SHA256
1
0
forked from pool/vsftpd
OBS User unknown 2008-09-13 10:26:56 +00:00 committed by Git OBS Bridge
parent e6d7caf088
commit 5d7e7a661d
11 changed files with 81 additions and 138 deletions

View File

@ -1,6 +1,6 @@
--- vsftpd.conf --- vsftpd.conf
+++ vsftpd.conf +++ vsftpd.conf
@@ -4,100 +4,214 @@ @@ -4,100 +4,218 @@
# loosens things up a bit, to make the ftp daemon more usable. # loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults. # Please see vsftpd.conf.5 for all compiled in defaults.
# #
@ -254,6 +254,10 @@
-# the presence of the "-R" option, so there is a strong case for enabling it. -# the presence of the "-R" option, so there is a strong case for enabling it.
-#ls_recurse_enable=YES -#ls_recurse_enable=YES
+listen=YES +listen=YES
+
+# Set to ssl_enable=YES if you want to enable SSL +# Set to ssl_enable=YES if you want to enable SSL
+ssl_enable=NO +ssl_enable=NO
+# Limit passive ports to this range to assis firewalling
+pasv_min_port=1024
+pasv_max_port=2024

View File

@ -16,11 +16,3 @@
locate_library /usr/lib/libcrypt.so && echo "-lcrypt"; locate_library /usr/lib/libcrypt.so && echo "-lcrypt";
fi fi
@@ -44,6 +46,7 @@
# Look for libcap (capabilities)
locate_library /lib/libcap.so.1 && echo "/lib/libcap.so.1";
+locate_library /lib64/libcap.so.1 && echo "/lib64/libcap.so.1";
locate_library /usr/lib/libcap.so && echo "-lcap";
# Solaris needs this for nanosleep()..

View File

@ -1,8 +1,8 @@
Index: vsftpd-1.2.1/str.c Index: vsftpd-1.2.1/str.c
=================================================================== ================================================================================
--- vsftpd-1.2.1.orig/str.c --- vsftpd-2.0.7/str.c
+++ vsftpd-1.2.1/str.c +++ vsftpd-2.0.7/str.c
@@ -27,6 +27,24 @@ static int str_equal_internal(const char @@ -27,6 +27,24 @@
const char* p_buf2, unsigned int buf2_len); const char* p_buf2, unsigned int buf2_len);
/* Private functions */ /* Private functions */
@ -27,8 +27,8 @@ Index: vsftpd-1.2.1/str.c
static void static void
s_setbuf(struct mystr* p_str, char* p_newbuf) s_setbuf(struct mystr* p_str, char* p_newbuf)
{ {
@@ -153,6 +171,45 @@ str_reserve(struct mystr* p_str, unsigne @@ -158,6 +176,45 @@
} p_str->p_buf[res_len - 1] = '\0';
} }
+int str_is_utf8( const struct mystr* p_str ) +int str_is_utf8( const struct mystr* p_str )
@ -73,7 +73,7 @@ Index: vsftpd-1.2.1/str.c
int int
str_isempty(const struct mystr* p_str) str_isempty(const struct mystr* p_str)
{ {
@@ -648,11 +705,13 @@ void @@ -657,11 +714,13 @@
str_replace_unprintable(struct mystr* p_str, char new_char) str_replace_unprintable(struct mystr* p_str, char new_char)
{ {
unsigned int i; unsigned int i;
@ -91,11 +91,9 @@ Index: vsftpd-1.2.1/str.c
} }
} }
} }
Index: vsftpd-1.2.1/str.h --- vsftpd-2.0.7/str.h
=================================================================== +++ vsftpd-2.0.7/str.h
--- vsftpd-1.2.1.orig/str.h @@ -36,6 +36,7 @@
+++ vsftpd-1.2.1/str.h
@@ -36,6 +36,7 @@ void str_free(struct mystr* p_str);
void str_trunc(struct mystr* p_str, unsigned int trunc_len); void str_trunc(struct mystr* p_str, unsigned int trunc_len);
void str_reserve(struct mystr* p_str, unsigned int res_len); void str_reserve(struct mystr* p_str, unsigned int res_len);

View File

@ -1,15 +1,14 @@
--- vsf_findlibs.sh-dist 2008-05-02 09:44:39.000000000 +0200 --- vsf_findlibs.sh
+++ vsf_findlibs.sh 2008-05-02 09:46:35.000000000 +0200 +++ vsf_findlibs.sh
@@ -45,9 +45,10 @@ @@ -45,9 +45,10 @@
locate_library /usr/lib/libsec.sl && echo "-lsec"; locate_library /usr/lib/libsec.sl && echo "-lsec";
# Look for libcap (capabilities) # Look for libcap (capabilities)
-locate_library /lib/libcap.so.1 && echo "/lib/libcap.so.1"; -locate_library /lib/libcap.so.1 && echo "/lib/libcap.so.1";
-locate_library /lib64/libcap.so.1 && echo "/lib64/libcap.so.1";
+# locate_library /lib/libcap.so.1 && echo "/lib/libcap.so.1";
+# locate_library /lib64/libcap.so.1 && echo "/lib64/libcap.so.1";
locate_library /usr/lib/libcap.so && echo "-lcap"; locate_library /usr/lib/libcap.so && echo "-lcap";
locate_library /lib/libcap.so && echo "-lcap";
+locate_library /usr/lib64/libcap.so && echo "-lcap"; +locate_library /usr/lib64/libcap.so && echo "-lcap";
+locate_library /lib64/libcap.so && echo "-lcap";
# Solaris needs this for nanosleep().. # Solaris needs this for nanosleep()..
locate_library /lib/libposix4.so && echo "-lposix4"; locate_library /lib/libposix4.so && echo "-lposix4";

View File

@ -1,73 +0,0 @@
--- vsftpd-2.0.4/standalone.c.listen-retry 2008-05-14 11:56:57.775023643 -0700
+++ vsftpd-2.0.4/standalone.c 2008-05-14 12:11:16.501225812 -0700
@@ -130,7 +130,11 @@
die("could not bind listening IPv6 socket");
}
}
- vsf_sysutil_listen(listen_sock, VSFTP_LISTEN_BACKLOG);
+ retval = vsf_sysutil_listen(listen_sock, VSFTP_LISTEN_BACKLOG);
+ if (vsf_sysutil_retval_is_error(retval))
+ {
+ die("could not listen");
+ }
vsf_sysutil_sockaddr_alloc(&p_accept_addr);
while (1)
{
--- vsftpd-2.0.4/sysutil.h.listen-retry 2008-05-14 11:55:58.851165197 -0700
+++ vsftpd-2.0.4/sysutil.h 2008-05-14 12:07:08.357934466 -0700
@@ -239,7 +239,7 @@
struct vsf_sysutil_socketpair_retval
vsf_sysutil_unix_stream_socketpair(void);
int vsf_sysutil_bind(int fd, const struct vsf_sysutil_sockaddr* p_sockptr);
-void vsf_sysutil_listen(int fd, const unsigned int backlog);
+int vsf_sysutil_listen(int fd, const unsigned int backlog);
void vsf_sysutil_getsockname(int fd, struct vsf_sysutil_sockaddr** p_sockptr);
void vsf_sysutil_getpeername(int fd, struct vsf_sysutil_sockaddr** p_sockptr);
int vsf_sysutil_accept_timeout(int fd, struct vsf_sysutil_sockaddr* p_sockaddr,
--- vsftpd-2.0.4/postlogin.c.listen-retry 2008-05-14 11:54:22.182803066 -0700
+++ vsftpd-2.0.4/postlogin.c 2008-05-14 12:14:08.116688582 -0700
@@ -555,7 +555,11 @@
retval = vsf_sysutil_bind(p_sess->pasv_listen_fd, s_p_sockaddr);
if (!vsf_sysutil_retval_is_error(retval))
{
- break;
+ retval = vsf_sysutil_listen(p_sess->pasv_listen_fd, 1);
+ if (!vsf_sysutil_retval_is_error(retval))
+ {
+ break;
+ }
}
if (vsf_sysutil_get_error() == kVSFSysUtilErrADDRINUSE)
{
@@ -567,7 +571,6 @@
{
die("vsf_sysutil_bind");
}
- vsf_sysutil_listen(p_sess->pasv_listen_fd, 1);
if (is_epsv)
{
str_alloc_text(&s_pasv_res_str, "Entering Extended Passive Mode (|||");
--- vsftpd-2.0.4/sysutil.c.listen-retry 2006-01-09 09:05:18.000000000 -0800
+++ vsftpd-2.0.4/sysutil.c 2008-05-14 12:06:41.211606698 -0700
@@ -1614,14 +1614,18 @@
return bind(fd, p_sockaddr, len);
}
-void
+int
vsf_sysutil_listen(int fd, const unsigned int backlog)
{
int retval = listen(fd, backlog);
- if (retval != 0)
+ if (vsf_sysutil_retval_is_error(retval))
{
- die("listen");
+ if (vsf_sysutil_get_error() != kVSFSysUtilErrADDRINUSE)
+ {
+ die("listen");
+ }
}
+ return(retval);
}
/* Warning: callers of this function assume it does NOT make use of any

View File

@ -1,27 +1,14 @@
diff -up vsftpd-2.0.5/sysutil.h.write_race vsftpd-2.0.5/sysutil.h --- postlogin.c
--- vsftpd-2.0.5/sysutil.h.write_race 2007-11-21 08:48:28.000000000 +0100 +++ postlogin.c
+++ vsftpd-2.0.5/sysutil.h 2007-11-21 08:48:28.000000000 +0100 @@ -983,6 +983,7 @@
@@ -91,6 +91,8 @@ void vsf_sysutil_close(int fd);
int vsf_sysutil_close_failok(int fd);
int vsf_sysutil_unlink(const char* p_dead);
int vsf_sysutil_write_access(const char* p_filename);
+/* Trucate after open */
+int vsf_sysutil_truncate(int fd, filesize_t length);
/* Reading and writing */
void vsf_sysutil_lseek_to(const int fd, filesize_t seek_pos);
diff -up vsftpd-2.0.5/postlogin.c.write_race vsftpd-2.0.5/postlogin.c
--- vsftpd-2.0.5/postlogin.c.write_race 2007-11-21 08:48:28.000000000 +0100
+++ vsftpd-2.0.5/postlogin.c 2007-11-21 08:51:59.000000000 +0100
@@ -953,6 +953,7 @@ handle_upload_common(struct vsf_session*
struct vsf_transfer_ret trans_ret;
int new_file_fd;
int remote_fd; int remote_fd;
int success = 0;
int created = 0;
+ int truncit = 0; + int truncit = 0;
filesize_t offset = p_sess->restart_pos; filesize_t offset = p_sess->restart_pos;
p_sess->restart_pos = 0; p_sess->restart_pos = 0;
if (!data_transfer_checks_ok(p_sess)) if (!data_transfer_checks_ok(p_sess))
@@ -987,7 +988,15 @@ handle_upload_common(struct vsf_session* @@ -1017,7 +1018,15 @@
/* For non-anonymous, allow open() to overwrite or append existing files */ /* For non-anonymous, allow open() to overwrite or append existing files */
if (!is_append && offset == 0) if (!is_append && offset == 0)
{ {
@ -38,7 +25,7 @@ diff -up vsftpd-2.0.5/postlogin.c.write_race vsftpd-2.0.5/postlogin.c
} }
else else
{ {
@@ -1023,6 +1032,11 @@ handle_upload_common(struct vsf_session* @@ -1060,6 +1069,11 @@
if (tunable_lock_upload_files) if (tunable_lock_upload_files)
{ {
vsf_sysutil_lock_file_write(new_file_fd); vsf_sysutil_lock_file_write(new_file_fd);
@ -50,10 +37,9 @@ diff -up vsftpd-2.0.5/postlogin.c.write_race vsftpd-2.0.5/postlogin.c
} }
if (!is_append && offset != 0) if (!is_append && offset != 0)
{ {
diff -up vsftpd-2.0.5/sysutil.c.write_race vsftpd-2.0.5/sysutil.c --- sysutil.c
--- vsftpd-2.0.5/sysutil.c.write_race 2007-11-21 08:48:28.000000000 +0100 +++ sysutil.c
+++ vsftpd-2.0.5/sysutil.c 2007-11-21 08:48:28.000000000 +0100 @@ -1200,6 +1200,12 @@
@@ -1196,6 +1196,12 @@ vsf_sysutil_close_failok(int fd)
} }
int int
@ -66,3 +52,14 @@ diff -up vsftpd-2.0.5/sysutil.c.write_race vsftpd-2.0.5/sysutil.c
vsf_sysutil_unlink(const char* p_dead) vsf_sysutil_unlink(const char* p_dead)
{ {
return unlink(p_dead); return unlink(p_dead);
--- sysutil.h
+++ sysutil.h
@@ -90,6 +90,8 @@
int vsf_sysutil_close_failok(int fd);
int vsf_sysutil_unlink(const char* p_dead);
int vsf_sysutil_write_access(const char* p_filename);
+/* Trucate after open */
+int vsf_sysutil_truncate(int fd, filesize_t length);
/* Reading and writing */
void vsf_sysutil_lseek_to(const int fd, filesize_t seek_pos);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08a00c726f74f68c5682d826dcb3f038c307ffef59ab88753e3ac0c462b08cd8
size 118231

3
vsftpd-2.0.7.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:56567db3afd6939599a5361aa69aad9358b2820e94f500bcb7e9ede1401f39c6
size 119410

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Sep 8 15:30:43 CEST 2008 - hvogel@suse.de
- version 2.0.7
* Fix man page typo
* Enhance logging for debug_ssl
* Shutdown the SSL data connections properly
* Add option to enforce proper SSL shutdown on uploads
* Add option to delete failed uploads
- limit port range for passv to 1024:2024 to assist firewalling
[bnc#420671]
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 11 12:44:25 CEST 2008 - hvogel@suse.de Wed Jun 11 12:44:25 CEST 2008 - hvogel@suse.de

View File

@ -2,10 +2,10 @@
## Description: Opens ports for vsftpd Server. ## Description: Opens ports for vsftpd Server.
# space separated list of allowed TCP ports # space separated list of allowed TCP ports
TCP="ftp ftp-data" TCP="ftp 1024:2024"
# space separated list of allowed UDP ports # space separated list of allowed UDP ports
UDP="ftp-data" UDP=""
# space separated list of allowed RPC services # space separated list of allowed RPC services
RPC="" RPC=""

View File

@ -1,10 +1,17 @@
# #
# spec file for package vsftpd (Version 2.0.6) # spec file for package vsftpd (Version 2.0.7)
# #
# Copyright (c) 2008 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
# package are under the same license as the package itself.
# #
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
@ -18,8 +25,8 @@ BuildRequires: libcap
%else %else
BuildRequires: libcap-devel BuildRequires: libcap-devel
%endif %endif
Version: 2.0.6 Version: 2.0.7
Release: 27 Release: 1
Summary: Very Secure FTP Daemon - Written from Scratch Summary: Very Secure FTP Daemon - Written from Scratch
License: GPL v2 or later License: GPL v2 or later
Group: Productivity/Networking/Ftp/Servers Group: Productivity/Networking/Ftp/Servers
@ -42,7 +49,6 @@ Patch7: %name-2.0.5-enable-debuginfo.patch
Patch8: %name-2.0.5-utf8-log-names.patch Patch8: %name-2.0.5-utf8-log-names.patch
Patch9: %name-2.0.6-libcap2-fix.diff Patch9: %name-2.0.6-libcap2-fix.diff
Patch10: %name-2.0.6-write_race.patch Patch10: %name-2.0.6-write_race.patch
Patch11: %name-2.0.6-listen-retry.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: ftp-server Provides: ftp-server
PreReq: %insserv_prereq /usr/sbin/useradd PreReq: %insserv_prereq /usr/sbin/useradd
@ -66,7 +72,6 @@ Authors:
%prep %prep
%setup -q %setup -q
%patch
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
@ -76,8 +81,8 @@ Authors:
%patch7 %patch7
%patch8 -p1 %patch8 -p1
%patch9 %patch9
%patch10 -p1 %patch10
%patch11 -p1 %patch
%build %build
rm -f dummyinc/sys/capability.h rm -f dummyinc/sys/capability.h
@ -133,6 +138,15 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%changelog %changelog
* Mon Sep 08 2008 hvogel@suse.de
- version 2.0.7
* Fix man page typo
* Enhance logging for debug_ssl
* Shutdown the SSL data connections properly
* Add option to enforce proper SSL shutdown on uploads
* Add option to delete failed uploads
- limit port range for passv to 1024:2024 to assist firewalling
[bnc#420671]
* Wed Jun 11 2008 hvogel@suse.de * Wed Jun 11 2008 hvogel@suse.de
- Fix simultaneous ftp put of the same file [bnc#361559, bnc#273454] - Fix simultaneous ftp put of the same file [bnc#361559, bnc#273454]
- dont die on EADDRINUSE but try again [bnc#395899] - dont die on EADDRINUSE but try again [bnc#395899]