rpms/vsftpd/devel vsftpd-2.1.1-daemonize_plus.patch, 1.2, 1.3 vsftpd.init, 1.5, 1.6 vsftpd.spec, 1.90, 1.91
Jiri Skala
jskala at fedoraproject.org
Thu May 21 05:53:01 UTC 2009
- Previous message: rpms/perl-POE-Component-SSLify/devel .cvsignore, 1.7, 1.8 perl-POE-Component-SSLify.spec, 1.10, 1.11 sources, 1.7, 1.8
- Next message: rpms/perl-POE-Component-Server-SOAP/devel .cvsignore, 1.5, 1.6 perl-POE-Component-Server-SOAP.spec, 1.9, 1.10 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jskala
Update of /cvs/extras/rpms/vsftpd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26527
Modified Files:
vsftpd-2.1.1-daemonize_plus.patch vsftpd.init vsftpd.spec
Log Message:
* Thu May 21 2009 Jiri Skala <jskala at redhat.com> - 2.1.1-0.3
- fixed daemonize_plus patch
- fixed test in initscript [ -z "CONFS" ]
vsftpd-2.1.1-daemonize_plus.patch:
Index: vsftpd-2.1.1-daemonize_plus.patch
===================================================================
RCS file: /cvs/extras/rpms/vsftpd/devel/vsftpd-2.1.1-daemonize_plus.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- vsftpd-2.1.1-daemonize_plus.patch 4 May 2009 14:37:06 -0000 1.2
+++ vsftpd-2.1.1-daemonize_plus.patch 21 May 2009 05:53:01 -0000 1.3
@@ -1,6 +1,6 @@
diff -up vsftpd-2.1.1/standalone.c.daemonize_plus vsftpd-2.1.1/standalone.c
---- vsftpd-2.1.1/standalone.c.daemonize_plus 2009-05-04 16:18:30.000000000 +0200
-+++ vsftpd-2.1.1/standalone.c 2009-05-04 16:18:30.000000000 +0200
+--- vsftpd-2.1.1/standalone.c.daemonize_plus 2009-05-10 22:11:24.000000000 +0200
++++ vsftpd-2.1.1/standalone.c 2009-05-10 22:11:24.000000000 +0200
@@ -26,6 +26,8 @@ static unsigned int s_ipaddr_size;
static void handle_sigchld(void* duff);
@@ -10,22 +10,32 @@ diff -up vsftpd-2.1.1/standalone.c.daemo
static void prepare_child(int sockfd);
static unsigned int handle_ip_count(void* p_raw_addr);
static void drop_ip_count(void* p_raw_addr);
-@@ -50,7 +52,13 @@ vsf_standalone_main(void)
+@@ -46,11 +48,23 @@ vsf_standalone_main(void)
+ }
+ if (tunable_background)
+ {
++ vsf_sysutil_sigaction(kVSFSysUtilSigALRM, handle_sigalrm);
++ vsf_sysutil_sigaction(kVSFSysUtilSigUSR1, handle_sigusr1);
++
+ int forkret = vsf_sysutil_fork();
if (forkret > 0)
{
/* Parent, just exit */
- vsf_sysutil_exit(0);
-+ vsf_sysutil_sigaction(kVSFSysUtilSigALRM, handle_sigalrm);
-+ vsf_sysutil_sigaction(kVSFSysUtilSigUSR1, handle_sigusr1);
-+
+ vsf_sysutil_set_alarm(3);
+ vsf_sysutil_pause();
+
+ vsf_sysutil_exit(1);
++ }
++ else if (forkret == 0)
++ {
++ // Son, restore original signal handler
++ vsf_sysutil_sigaction(kVSFSysUtilSigALRM, 0L);
++ vsf_sysutil_sigaction(kVSFSysUtilSigUSR1, 0L);
}
/* Son, close standard FDs to avoid SSH hang-on-exit */
vsf_sysutil_reopen_standard_fds();
-@@ -98,6 +106,10 @@ vsf_standalone_main(void)
+@@ -98,6 +112,10 @@ vsf_standalone_main(void)
{
die("could not bind listening IPv4 socket");
}
@@ -36,7 +46,7 @@ diff -up vsftpd-2.1.1/standalone.c.daemo
}
else
{
-@@ -127,6 +139,10 @@ vsf_standalone_main(void)
+@@ -127,6 +145,10 @@ vsf_standalone_main(void)
{
die("could not bind listening IPv6 socket");
}
@@ -47,7 +57,7 @@ diff -up vsftpd-2.1.1/standalone.c.daemo
}
vsf_sysutil_close(0);
vsf_sysutil_close(1);
-@@ -252,6 +268,20 @@ handle_sighup(void* duff)
+@@ -252,6 +274,20 @@ handle_sighup(void* duff)
vsf_parseconf_load_file(0, 0);
}
@@ -69,8 +79,8 @@ diff -up vsftpd-2.1.1/standalone.c.daemo
hash_ip(unsigned int buckets, void* p_key)
{
diff -up vsftpd-2.1.1/sysutil.c.daemonize_plus vsftpd-2.1.1/sysutil.c
---- vsftpd-2.1.1/sysutil.c.daemonize_plus 2009-05-04 16:18:30.000000000 +0200
-+++ vsftpd-2.1.1/sysutil.c 2009-05-04 16:18:30.000000000 +0200
+--- vsftpd-2.1.1/sysutil.c.daemonize_plus 2009-05-10 22:11:24.000000000 +0200
++++ vsftpd-2.1.1/sysutil.c 2009-05-10 22:11:59.000000000 +0200
@@ -201,6 +201,9 @@ vsf_sysutil_translate_sig(const enum EVS
case kVSFSysUtilSigHUP:
realsig = SIGHUP;
@@ -94,16 +104,46 @@ diff -up vsftpd-2.1.1/sysutil.c.daemoniz
int
vsf_sysutil_fork(void)
{
-@@ -2786,3 +2795,23 @@ vsf_sysutil_set_no_fds()
+@@ -2786,3 +2795,53 @@ vsf_sysutil_set_no_fds()
die("setrlimit NOFILE");
}
}
+
++static struct sigaction sigalr, sigusr1;
++
+void
+vsf_sysutil_sigaction(const enum EVSFSysUtilSignal sig, void (*p_handlefunc)(int))
+{
+ int realsig = vsf_sysutil_translate_sig(sig);
-+ vsf_sysutil_set_sighandler(realsig, p_handlefunc);
++ int retval;
++ struct sigaction sigact, *origsigact=NULL;
++ if (realsig==SIGALRM)
++ {
++ origsigact = &sigalr;
++ }
++ else if (realsig==SIGUSR1)
++ {
++ origsigact = &sigusr1;
++ }
++ vsf_sysutil_memclr(&sigact, sizeof(sigact));
++ if (p_handlefunc != NULL)
++ {
++ sigact.sa_handler = p_handlefunc;
++ retval = sigfillset(&sigact.sa_mask);
++ if (retval != 0)
++ {
++ die("sigfillset");
++ }
++ retval = sigaction(realsig, &sigact, origsigact);
++ }
++ else
++ {
++ retval = sigaction(realsig, origsigact, NULL);
++ }
++ if (retval != 0)
++ {
++ die("sigaction");
++ }
+}
+
+int
@@ -119,8 +159,8 @@ diff -up vsftpd-2.1.1/sysutil.c.daemoniz
+ return pause();
+}
diff -up vsftpd-2.1.1/sysutil.h.daemonize_plus vsftpd-2.1.1/sysutil.h
---- vsftpd-2.1.1/sysutil.h.daemonize_plus 2009-05-04 16:18:30.000000000 +0200
-+++ vsftpd-2.1.1/sysutil.h 2009-05-04 16:23:47.000000000 +0200
+--- vsftpd-2.1.1/sysutil.h.daemonize_plus 2009-05-10 22:11:24.000000000 +0200
++++ vsftpd-2.1.1/sysutil.h 2009-05-10 22:11:24.000000000 +0200
@@ -29,7 +29,8 @@ enum EVSFSysUtilSignal
kVSFSysUtilSigCHLD,
kVSFSysUtilSigPIPE,
Index: vsftpd.init
===================================================================
RCS file: /cvs/extras/rpms/vsftpd/devel/vsftpd.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- vsftpd.init 25 Feb 2008 16:25:30 -0000 1.5
+++ vsftpd.init 21 May 2009 05:53:01 -0000 1.6
@@ -37,7 +37,7 @@ start() {
if [ -d /etc/vsftpd ] ; then
CONFS=`ls /etc/vsftpd/*.conf 2>/dev/null`
- [ -z $CONFS ] && exit 6
+ [ -z "$CONFS" ] && exit 6
for i in $CONFS; do
site=`basename $i .conf`
echo -n $"Starting $prog for $site: "
Index: vsftpd.spec
===================================================================
RCS file: /cvs/extras/rpms/vsftpd/devel/vsftpd.spec,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -p -r1.90 -r1.91
--- vsftpd.spec 4 May 2009 14:37:06 -0000 1.90
+++ vsftpd.spec 21 May 2009 05:53:01 -0000 1.91
@@ -3,7 +3,7 @@
Name: vsftpd
Version: 2.1.1
-Release: 0.2.%{pretag}%{?dist}
+Release: 0.3.%{pretag}%{?dist}
Summary: Very Secure Ftp Daemon
Group: System Environment/Daemons
@@ -139,6 +139,10 @@ fi
%changelog
+* Thu May 21 2009 Jiri Skala <jskala at redhat.com> - 2.1.1-0.3
+- fixed daemonize_plus patch
+- fixed test in initscript [ -z "CONFS" ]
+
* Mon May 04 2009 Jiri Skala <jskala at redhat.com> - 2.1.1-0.2
- fixes daemonize patch
- Previous message: rpms/perl-POE-Component-SSLify/devel .cvsignore, 1.7, 1.8 perl-POE-Component-SSLify.spec, 1.10, 1.11 sources, 1.7, 1.8
- Next message: rpms/perl-POE-Component-Server-SOAP/devel .cvsignore, 1.5, 1.6 perl-POE-Component-Server-SOAP.spec, 1.9, 1.10 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list