forked from pool/stunnel
fix build
OBS-URL: https://build.opensuse.org/package/show/security:Stunnel/stunnel?expand=0&rev=30
This commit is contained in:
committed by
Git OBS Bridge
parent
1ef20abfb3
commit
e64074d042
27
stunnel-4.21-write_pid_as_root.diff
Normal file
27
stunnel-4.21-write_pid_as_root.diff
Normal file
@@ -0,0 +1,27 @@
|
||||
Index: stunnel-4.21/src/stunnel.c
|
||||
===================================================================
|
||||
--- stunnel-4.21.orig/src/stunnel.c
|
||||
+++ stunnel-4.21/src/stunnel.c
|
||||
@@ -174,8 +174,8 @@
|
||||
#ifdef HAVE_CHROOT
|
||||
make_chroot();
|
||||
#endif /* HAVE_CHROOT */
|
||||
- drop_privileges();
|
||||
create_pid();
|
||||
+ drop_privileges();
|
||||
#endif /* !defined USE_WIN32 && !defined (__vms) */
|
||||
/* create exec+connect services */
|
||||
for(opt=local_options.next; opt; opt=opt->next) {
|
||||
@@ -433,8 +433,10 @@
|
||||
s_log(LOG_DEBUG, "removing pid file %s", options.pidfile);
|
||||
if((unsigned long)getpid()!=options.dpid)
|
||||
return; /* current process is not main daemon process */
|
||||
- if(unlink(options.pidfile)<0)
|
||||
- ioerror(options.pidfile); /* not critical */
|
||||
+ if(unlink(options.pidfile)<0) {
|
||||
+ if(errno!=EACCES && errno!=ENOENT)
|
||||
+ ioerror(options.pidfile); /* not critical */
|
||||
+ }
|
||||
}
|
||||
|
||||
static void signal_handler(int sig) { /* signal handler */
|
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 25 11:23:01 CET 2008 - poeml@suse.de
|
||||
|
||||
- fix build (re-diff stunnel-4.21-write_pid_as_root.diff)
|
||||
- fix filelist (make sure that the binaries stay in /usr/sbin)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 29 17:54:21 CET 2007 - poeml@suse.de
|
||||
|
||||
|
@@ -32,7 +32,7 @@ Source1: stunnel.conf
|
||||
Source2: stunnel.README
|
||||
Source3: sysconfig.syslog-stunnel
|
||||
Source4: stunnel.rc
|
||||
Patch1: stunnel-4.14-write_pid_as_root.diff
|
||||
Patch1: stunnel-4.21-write_pid_as_root.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define VENDOR SUSE
|
||||
|
||||
@@ -67,6 +67,7 @@ echo -e ".\n.\n.\n.\n.\n" | make LDADD="$pie -Wl,-z,defs,-z,relro"
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/stunnel/{etc,dev,bin,sbin,%_lib}
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/stunnel
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
|
||||
@@ -85,6 +86,7 @@ cp -p %{S:3} $RPM_BUILD_ROOT/var/adm/fillup-templates/
|
||||
install -m 744 $RPM_SOURCE_DIR/stunnel.rc $RPM_BUILD_ROOT/etc/init.d/stunnel
|
||||
ln -s ../../etc/init.d/stunnel $RPM_BUILD_ROOT/usr/sbin/rcstunnel
|
||||
ln -s stunnel3 $RPM_BUILD_ROOT/usr/sbin/stunnel3_wrapper
|
||||
mv $RPM_BUILD_ROOT/%{_bindir}/* $RPM_BUILD_ROOT/%{_sbindir}
|
||||
rm $RPM_BUILD_ROOT/%{_sysconfdir}/stunnel/stunnel.pem
|
||||
rm $RPM_BUILD_ROOT/%{_sysconfdir}/stunnel/stunnel.conf-sample
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/doc/stunnel
|
||||
@@ -138,7 +140,7 @@ fi
|
||||
%doc tools/stunnel.cnf
|
||||
%doc tools/stunnel.conf-sample
|
||||
%{_sbindir}/*
|
||||
%{_libdir}/libstunnel*
|
||||
%{_libdir}/stunnel/*
|
||||
%{_mandir}/man8/*
|
||||
%dir %attr(700,root,root) %{_sysconfdir}/stunnel
|
||||
%dir %attr(755,root,root) /var/lib/stunnel
|
||||
|
Reference in New Issue
Block a user