Hello community, here is the log from the commit of package uucp for openSUSE:Factory checked in at 2017-04-17 10:26:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/uucp (Old) and /work/SRC/openSUSE:Factory/.uucp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "uucp" Mon Apr 17 10:26:15 2017 rev:1 rq:487289 version:1.07 Changes: -------- New Changes file: --- /dev/null 2017-03-01 00:40:19.279048016 +0100 +++ /work/SRC/openSUSE:Factory/.uucp.new/uucp.changes 2017-04-17 10:26:21.065875727 +0200 @@ -0,0 +1,403 @@ +------------------------------------------------------------------- +Fri Apr 7 23:42:15 UTC 2017 - [email protected] + +- Combine %service_ calls as they contain a lot of shell. +- Undo accidental linejoining of description. +- Spell out UUCP in summary to fill it. +- Use modern tar syntax and compact chmod syntax. + +------------------------------------------------------------------- +Thu Apr 6 08:14:22 UTC 2017 - [email protected] + +- Split of xinetd configuration as its own package +- Make sure that suucp.service does work with the suucp-server.conf + as here stunnel should not be used in inetd mode nor can it + (currently) use socket forwarding done by systemd + +------------------------------------------------------------------- +Tue Apr 4 17:53:18 UTC 2017 - [email protected] + +- Remove the usermode line as now we do not need to become member of + group lock + +------------------------------------------------------------------- +Tue Apr 4 16:02:31 UTC 2017 - [email protected] + +- Finalize the package that is + * use /var/lock/uucp for session locking + * add dircategory "Networking tools" for uucp info + * reflect our current permission handling with chkstat + +------------------------------------------------------------------- +Tue Apr 4 13:46:50 UTC 2017 - [email protected] + +- Add patch uucp-1.07-configure.patch + that is help configure script to find sigsetjmp + +------------------------------------------------------------------- +Sat Apr 1 11:58:35 UTC 2017 - [email protected] + +- Add some ACL group permissions for group uucp for /run/lock and + /run/lock/lockdev as otherwise we might fail + +------------------------------------------------------------------- +Sat Apr 1 09:06:19 UTC 2017 - [email protected] + +- Add patch uucp-1.07-initgroups.patch to initialize further + groups to which user uucp might be belongs to + +------------------------------------------------------------------- +Fri Mar 31 17:34:21 UTC 2017 - [email protected] + +- We should use now the suucp service port and not generic stunnel + not ssl for taylor uucp configuration +- Also we now can allow to let stunnel execute uucico without + local connection over xinetd or systemd + +------------------------------------------------------------------- +Fri Mar 31 13:54:24 UTC 2017 - [email protected] + +- Provide both uucp/suucp xinetd *and* systemd activated service +- Add patches + * address-wildcard-in-port.patch + * fix-proty-gcc33.patch + * uucp-1.07-sigfpe2.patch + to fix potential crashes with SIGFPE + * uucp-1.07-lfs.patch + to fix truncation of values on 32bit platforms where statvfs64 + is being called on a lfs +- Add xinetd.uucp and uucp.pam + +------------------------------------------------------------------- +Thu Oct 27 11:32:24 CEST 2016 - [email protected] + +- Require user and group uucp + +------------------------------------------------------------------- +Thu Jul 28 08:25:45 UTC 2016 - [email protected] + +- Add example config to etc and dscribe what is needed for the + stunnel to work bnc#990849 + +------------------------------------------------------------------- +Thu Jun 16 12:29:55 UTC 2016 - [email protected] + +- Switch from uucp xinetd to systemd activated service +- Switch from suucp stunnel service to systemd service properly + initing the stunnel + +------------------------------------------------------------------- +Thu Jun 16 12:12:00 UTC 2016 - [email protected] + +- Split out from sendmail package +- Cleanup to use proper deps and only depend on what's needed in which + scriptlet +- Use %configure macro and friends +- Use just make_install and describe what is going in the install phase + +------------------------------------------------------------------- +Mon Mar 2 08:28:11 UTC 2015 - [email protected] + +- Make makeinfo less restrict + +------------------------------------------------------------------- +Tue Feb 24 19:25:15 UTC 2015 - [email protected] + +- Add uucp-texinfo-5.0.patch: Fix build with texinfo 5.0. + +------------------------------------------------------------------- +Wed Sep 10 12:22:47 UTC 2014 - [email protected] + +- don't set LOCKDIR. uucp will properly use it's spool dir for system lock + files then. Serial lock files are handled by lockdev anyways (bnc#760079) +- add a line of debug output in case serial locking failed + +------------------------------------------------------------------- +Thu Nov 14 20:39:51 UTC 2013 - [email protected] + +- Drop obsolted ftime (drop_ftime.patch) + Broken under PowerKVM + +------------------------------------------------------------------- +Fri May 31 06:17:50 UTC 2013 - [email protected] + +- buildrequire makeinfo (automake 1.13 no longer requires it) + +------------------------------------------------------------------- +Fri May 25 15:00:21 UTC 2012 - [email protected] + +- Job creation scheme (bnc#764107) + +------------------------------------------------------------------- +Tue Mar 13 11:31:21 UTC 2012 - [email protected] + +- Add missing linkerflags to make it build w/ -fPIE properly + +------------------------------------------------------------------- +Tue Jan 24 17:17:07 UTC 2012 - [email protected] + +- Use -fPIE due bnc#743147 + +------------------------------------------------------------------- +Tue Jan 17 10:40:22 UTC 2012 - [email protected] + +- Remove suse_update_config usage. +- Add autoconf and automake as build requirements. + +------------------------------------------------------------------- +Thu Mar 10 13:32:16 CET 2011 - [email protected] + +- Change owner ship of /var/log/uucp to root and touch the log + files if not exists for user uucp (bnc#678432) + +------------------------------------------------------------------- +Tue Mar 9 16:03:15 UTC 2010 - [email protected] + +- use lockdev (FATE#308360) + +------------------------------------------------------------------- +Fri Dec 18 00:42:37 CET 2009 - [email protected] + +- Enable parallel building + +------------------------------------------------------------------- +Wed Jun 13 15:06:56 CEST 2007 - [email protected] + +- Recommend stunnel package (bug #254613) + +------------------------------------------------------------------- +Fri Feb 16 16:10:27 CET 2007 - [email protected] + +- Split off uucp spec file from sendmail spec file +- Require new rmail sub packages of sendmail + +------------------------------------------------------------------- +Mon Feb 12 17:22:04 CET 2007 - [email protected] + +- Make it build nonroot + +------------------------------------------------------------------- +Fri Jan 19 17:04:16 CET 2007 - [email protected] + +- Add uucp over ssh protocol and example to be able to use uucp + even with dynamic IP addresses on the client side. + +------------------------------------------------------------------- +Thu Jun 22 16:13:51 CEST 2006 - [email protected] + +- Add a few manual pages missed (bug #187356) + +------------------------------------------------------------------- +Tue Mar 14 16:47:09 CET 2006 - [email protected] + +- Remove contrib/uucomp.shar due broken license (bug #157791) + +------------------------------------------------------------------- +Thu Oct 13 14:51:17 CEST 2005 - [email protected] + ++++ 206 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Factory/.uucp.new/uucp.changes New: ---- address-wildcard-in-port.patch drop_ftime.patch fix-proty-gcc33.patch suucp.service uucp-1.07-configure.patch uucp-1.07-contrib.dif uucp-1.07-cu.patch uucp-1.07-grade.patch uucp-1.07-initgroups.patch uucp-1.07-lfs.patch uucp-1.07-lockdev.patch uucp-1.07-sigfpe2.patch uucp-1.07.dif uucp-1.07.tar.gz uucp-rpmlintrc uucp-texinfo-5.0.patch uucp.bashrc uucp.changes uucp.pam uucp.socket uucp.spec uucp.tmpfiles [email protected] uucpcfg.tar.bz2 uucpman.sh xinetd.uucp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ uucp.spec ++++++ # # spec file for package uucp # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # 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/ # Name: uucp Version: 1.07 Release: 0 Summary: Taylor Unix-to-Unix copy License: GPL-2.0+ Group: Productivity/Networking/Other Url: https://www.gnu.org/software/uucp/ Source0: http://ftp.gnu.org/gnu/uucp/%{name}-%{version}.tar.gz Source1: uucpcfg.tar.bz2 Source3: suucp.service Source4: uucpman.sh Source5: [email protected] Source6: uucp.socket Source7: uucp.pam Source8: xinetd.uucp Source9: uucp-rpmlintrc Source10: uucp.bashrc Source11: uucp.tmpfiles Patch0: uucp-1.07.dif Patch1: uucp-1.07-contrib.dif Patch2: uucp-1.07-grade.patch Patch3: uucp-1.07-cu.patch Patch4: uucp-1.07-lockdev.patch Patch5: drop_ftime.patch Patch6: uucp-texinfo-5.0.patch Patch7: address-wildcard-in-port.patch Patch8: fix-proty-gcc33.patch Patch9: uucp-1.07-lfs.patch Patch10: uucp-1.07-sigfpe2.patch Patch11: uucp-1.07-initgroups.patch Patch12: uucp-1.07-configure.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: lockdev-devel BuildRequires: makeinfo BuildRequires: ncurses-devel BuildRequires: pkgconfig Requires: ca-certificates Requires: filesystem Requires: logrotate Requires: netcfg Requires: openssl Requires: stunnel Requires: rmail %if 0%{?suse_version} >= 1330 Requires(pre): user(uucp) group(uucp) %else Requires(pre): shadow %endif Requires(post): %{install_info_prereq} Requires(post): fileutils Requires(post): permissions Requires(preun): %{install_info_prereq} Requires(verify): permissions BuildRoot: %{_tmppath}/%{name}-%{version}-build %{?systemd_requires} %description Ian Taylor's Unix to Unix copy: mail and news over modem lines. This is the standard UUCP package from the Free Software Foundation. It is configured to use HoneyDanBer or Taylor configuration files. With version 6.0 of SuSE Linux, the configuration directory has been moved to %{_sysconfdir}/uucp. Exactly: Taylor config: %{_sysconfdir}/uucp HoneyDanBer config: %{_sysconfdir}/uucp/hdb_config If you have your own setup under {_localstatedir}/lib/uucp, please %move it to %{_sysconfdir}/uucp. Example configurations can be found in %{_docdir}/uucp. We did not include a uucp guest account. If you want to create a guest account, make sure the directory %{_localstatedir}/spool/uucppublic exists. %package xinetd Summary: Taylor UUCP using xinetd Group: Productivity/Networking/Other Requires: uucp = %version-%release Requires: xinetd %description xinetd Unix to Unix copy with xinetd setup instead of using modern systemd service units. %prep %setup -q %patch1 -p0 -b .cont %patch2 -p0 -b .grad %patch3 -p0 -b .cu %patch4 -p0 -b .lockdev %patch0 -p0 -b .p0 %patch5 -p1 -b .p5 %patch6 -p1 -b .p6 %patch7 -p1 -b .p7 %patch8 -p0 -b .p8 %patch9 -p1 -b .p9 %patch10 -p1 -b .p10 %patch11 -p0 -b .p11 %patch12 -p0 -b .p12 %build autoreconf -fvi export CFLAGS="%{optflags} -fno-strict-aliasing -fPIE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE" %configure \ --with-newconfigdir=%{_sysconfdir}/uucp \ --with-oldconfigdir=%{_sysconfdir}/uucp/hdb_config make %{?_smp_mflags} LDFLAGS="-pie" MAKEINFO="makeinfo --force" %install %make_install install-info # oldconfig mkdir -p -m 755 %{buildroot}%{_sysconfdir}/uucp/hdb_config # logrotate mkdir -p -m 755 %{buildroot}%{_sysconfdir}/logrotate.d install -m 644 logrotate %{buildroot}%{_sysconfdir}/logrotate.d/uucp # systemd services mkdir -p %{buildroot}%{_unitdir} install -m644 %{SOURCE3} %{buildroot}%{_unitdir} install -m644 %{SOURCE5} %{buildroot}%{_unitdir} install -m644 %{SOURCE6} %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -m644 %{SOURCE7} %{buildroot}%{_sysconfdir}/pam.d/uucp mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d install -m644 %{SOURCE8} %{buildroot}%{_sysconfdir}/xinetd.d/uucp # move to libexec mkdir -p -m 755 %{buildroot}%{_libexecdir}/uucp/ mv %{buildroot}%{_sbindir}/uu* %{buildroot}%{_libexecdir}/uucp/ for x in %{buildroot}%{_libexecdir}/uucp/* ; do echo ${x##*/} ln -fs %{_libexecdir}/uucp/${x##*/} %{buildroot}%{_sbindir}/ done # readme mkdir -p -m 755 %{buildroot}%{_localstatedir}/spool/uucp %{buildroot}%{_localstatedir}/spool/uucppublic install -m 644 README.suse %{buildroot}%{_localstatedir}/spool/uucppublic/README # docs rm -rf %{buildroot}%{_defaultdocdir}/uucp mkdir -p %{buildroot}%{_defaultdocdir}/uucp mkdir -p %{buildroot}%{_localstatedir}/log/uucp chmod 1755 %{buildroot}%{_localstatedir}/log/uucp tar -jxvpf %{SOURCE1} -C %{buildroot}%{_defaultdocdir}/uucp chmod -R uog+r %{buildroot}%{_defaultdocdir}/uucp/ cp %{buildroot}%{_defaultdocdir}/uucp/cfg_example/taylor_config/suucp-server.conf.systemd \ %{buildroot}%{_sysconfdir}/uucp/suucp-server.conf.systemd cp %{buildroot}%{_defaultdocdir}/uucp/cfg_example/taylor_config/suucp-server.conf.xinetd \ %{buildroot}%{_sysconfdir}/uucp/suucp-server.conf.xinetd cp %{buildroot}%{_defaultdocdir}/uucp/cfg_example/taylor_config/suucp-client.conf \ %{buildroot}%{_sysconfdir}/uucp/suucp-client.conf.example install -m 0640 %{SOURCE10} %{buildroot}%{_sysconfdir}/uucp/.bashrc mkdir %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE11} %{buildroot}%{_tmpfilesdir}/uucp.conf > list.files if ! tmp=$(rpm -qf %{_tmpfilesdir} 2>/dev/null) then echo %%dir %%{_tmpfilesdir} > list.files fi # rcbla compat symlink ln -fs service %{buildroot}/%{_sbindir}/rcs%{name} # manual pages for man in uulog uuto uuname uupick do test -e ${man}.1 || continue install -m 0644 ${man}.1 %{buildroot}%{_mandir}/man1/ done %verifyscript %verify_permissions -e %{_localstatedir}/spool/uucp/ %verify_permissions -e %{_localstatedir}/spool/uucppublic/ %verify_permissions -e %{_bindir}/uucp %verify_permissions -e %{_bindir}/uuname %verify_permissions -e %{_bindir}/uustat %verify_permissions -e %{_bindir}/uux %verify_permissions -e %{_libexecdir}/uucp/uucico %verify_permissions -e %{_libexecdir}/uucp/uuxqt %if 0 %verify_permissions -e %{_bindir}/uulog %verify_permissions -e %{_bindir}/uupick %endif %pre %service_add_pre s%{name}.service %{name}.socket %post %install_info --info-dir=%{_infodir} %{_infodir}/uucp.info%{ext_info} %service_add_post s%{name}.service %{name}.socket for log in Log Stats Debug ; do if test -e %{_localstatedir}/log/uucp/$log ; then continue fi touch %{_localstatedir}/log/uucp/$log chown uucp:uucp %{_localstatedir}/log/uucp/$log chmod 0640 %{_localstatedir}/log/uucp/$log done chown root:root %{_localstatedir}/log/uucp chmod 1755 %{_localstatedir}/log/uucp %set_permissions %{_localstatedir}/spool/uucp/ %set_permissions %{_localstatedir}/spool/uucppublic/ %set_permissions %{_bindir}/uucp %set_permissions %{_bindir}/uuname %set_permissions %{_bindir}/uustat %set_permissions %{_bindir}/uux %set_permissions %{_libexecdir}/uucp/uucico %set_permissions %{_libexecdir}/uucp/uuxqt %if 0 %set_permissions %{_bindir}/uulog %set_permissions %{_bindir}/uupick %endif %if %{defined tmpfiles_create} %tmpfiles_create %{_tmpfilesdir}/uucp.conf %else test -x /usr/bin/systemd-tmpfiles && /usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/uucp.conf || : %endif %preun %install_info_delete --info-dir=%{_infodir} %{_infodir}/uucp.info%{ext_info} %service_del_preun s%{name}.service %{name}.socket %postun %service_del_postun s%{name}.service %{name}.socket %files -f list.files %defattr(-,root,root) %{_unitdir}/%{name}@.service %{_unitdir}/%{name}.socket %{_unitdir}/s%{name}.service %{_sbindir}/rcs%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/uucp %config %{_sysconfdir}/pam.d/uucp %dir %attr(0750,uucp,uucp) %{_sysconfdir}/%{name}/ %config %attr(0640,uucp,uucp) %{_sysconfdir}/%{name}/suucp-server.conf.systemd %config %attr(0640,uucp,uucp) %{_sysconfdir}/%{name}/suucp-client.conf.example %config(noreplace) %attr(0640,uucp,uucp) %{_sysconfdir}/%{name}/.bashrc %dir %attr(0750,uucp,uucp) %{_sysconfdir}/uucp/hdb_config %dir %{_libexecdir}/uucp %dir %attr(1755,root,root) %{_localstatedir}/log/uucp %verify(not mode group) %dir %attr(1770,root,uucp) %{_localstatedir}/spool/uucppublic %attr(755,root,root) %{_bindir}/cu %verify(not mode) %attr(6555,uucp,uucp) %{_bindir}/uucp %verify(not mode) %attr(6555,uucp,uucp) %{_bindir}/uuname %verify(not mode) %attr(6555,uucp,uucp) %{_bindir}/uustat %verify(not mode) %attr(6555,uucp,uucp) %{_bindir}/uux %if 0 %verify(not mode) %attr(6555,uucp,uucp) %{_bindir}/uulog %verify(not mode) %attr(6555,uucp,uucp) %{_bindir}/uupick %else %{_bindir}/uulog %{_bindir}/uupick %endif %verify(not mode) %attr(6555,uucp,uucp) %{_libexecdir}/uucp/uucico %verify(not mode) %attr(6555,uucp,uucp) %{_libexecdir}/uucp/uuxqt %{_bindir}/uuto %{_infodir}/uucp.info*%{ext_info} %{_libexecdir}/uucp/uuchk %{_libexecdir}/uucp/uuconv %{_libexecdir}/uucp/uusched %{_sbindir}/uuchk %{_sbindir}/uucico %{_sbindir}/uuconv %{_sbindir}/uusched %{_sbindir}/uuxqt %{_mandir}/man1/*.1* %{_mandir}/man8/*.8* %{_localstatedir}/spool/uucppublic/README %doc %{_defaultdocdir}/uucp %attr(0640,root,uucp) %{_defaultdocdir}/uucp/cfg_example/taylor_config/call %attr(0640,root,uucp) %{_defaultdocdir}/uucp/cfg_example/taylor_config/passwd %{_tmpfilesdir}/uucp.conf %files xinetd %defattr(-,root,root) %config %attr(0640,uucp,uucp) %{_sysconfdir}/%{name}/suucp-server.conf.xinetd %config(noreplace) %{_sysconfdir}/xinetd.d/uucp %changelog ++++++ address-wildcard-in-port.patch ++++++ I use uucp over a pseudo-tty allocated by ssh with the i protocol. Especially I call several peers via this method. With the attached patch I can use one single port definition like port ssh type pipe command /usr/bin/ssh <lots of ssh options> \H instead of one port definitioon per peer.The sys definitions then all look like system uucp-peer address uucppeer.example.com port ssh Besides, the built-in tcp port could be replaced with this patch and netcat, or the tty port with chat. I thought it might be of general interest. --- uucp-1.07/unix/pipe.c +++ uucp-1.07/unix/pipe.c 1999-10-18 21:46:07.000000000 +0000 @@ -199,6 +199,7 @@ fspipe_dial (qconn, puuconf, qsys, zphon struct ssysdep_conn *q; int aidescs[3]; const char **pzprog; + char **p; q = (struct ssysdep_conn *) qconn->psysdep; @@ -211,6 +212,11 @@ fspipe_dial (qconn, puuconf, qsys, zphon ulog (LOG_ERROR, "No command for pipe connection"); return FALSE; } + + /* Look for a string \H and replaced it by the address given for this system */ + for (p=pzprog; *p; p++) + if (!strcmp(*p, "\\H")) + *p = zphone; aidescs[0] = SPAWN_WRITE_PIPE; aidescs[1] = SPAWN_READ_PIPE; ++++++ drop_ftime.patch ++++++ Index: uucp-1.07/configure =================================================================== --- uucp-1.07.orig/configure +++ uucp-1.07/configure @@ -3837,114 +3837,6 @@ else LIBOBJS="$LIBOBJS getlin.o" fi -echo $ac_n "checking for ftime""... $ac_c" 1>&6 -echo "configure:3842: checking for ftime" >&5 -if eval "test \"`echo '$''{'ac_cv_func_ftime'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 3847 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char ftime(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char ftime(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_ftime) || defined (__stub___ftime) -choke me -#else -ftime(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_ftime=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_ftime=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'ftime`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking that ftime works correctly""... $ac_c" 1>&6 -echo "configure:3885: checking that ftime works correctly" >&5 -if eval "test \"`echo '$''{'uucp_cv_sys_ftime_ok'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - uucp_cv_sys_ftime_ok=runtime -else - cat > conftest.$ac_ext <<EOF -#line 3893 "configure" -#include "confdefs.h" - -#include <sys/types.h> -#include <sys/timeb.h> -main () -{ - struct timeb s, slast; - int c = 0; - ftime (&slast); - while (c < 10) - { - ftime (&s); - if (s.time < slast.time - || (s.time == slast.time && s.millitm < slast.millitm)) - exit (1); - if (s.time != slast.time) - ++c; - slast.time = s.time; - slast.millitm = s.millitm; - } - exit (0); -} - -EOF -if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - uucp_cv_sys_ftime_ok=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - uucp_cv_sys_ftime_ok=no -fi -rm -fr conftest* -fi - -fi - -case $uucp_cv_sys_ftime_ok in -yes) echo "$ac_t""yes" 1>&6 ;; -no) echo "$ac_t""no" 1>&6 - echo "configure: warning: ftime seems to be buggy" 1>&2 ;; -runtime) echo "$ac_t""will check at run time" 1>&6 ;; -esac - -else - echo "$ac_t""no" 1>&6 -fi - -if test $uucp_cv_sys_ftime_ok = yes || test $uucp_cv_sys_ftime_ok = runtime; then - cat >> confdefs.h <<\EOF -#define HAVE_FTIME 1 -EOF - -fi for ac_func in times do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 Index: uucp-1.07/configure.in =================================================================== --- uucp-1.07.orig/configure.in +++ uucp-1.07/configure.in @@ -371,48 +371,6 @@ AC_CHECK_FUNC(getdelim, [AC_LIBOBJ(getlin)])], [AC_LIBOBJ(getlin)]) dnl -dnl Check for the SCO buggy ftime; the code can cope with the bug, -dnl though it would prefer not to, so if we're cross-configuring we -dnl accept that ftime exists. -AC_CHECK_FUNC(ftime, -[AC_MSG_CHECKING(that ftime works correctly) -AC_CACHE_VAL(uucp_cv_sys_ftime_ok, -[AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/timeb.h> -main () -{ - struct timeb s, slast; - int c = 0; - ftime (&slast); - while (c < 10) - { - ftime (&s); - if (s.time < slast.time - || (s.time == slast.time && s.millitm < slast.millitm)) - exit (1); - if (s.time != slast.time) - ++c; - slast.time = s.time; - slast.millitm = s.millitm; - } - exit (0); -} -], -uucp_cv_sys_ftime_ok=yes, -uucp_cv_sys_ftime_ok=no, -uucp_cv_sys_ftime_ok=runtime)]) -case $uucp_cv_sys_ftime_ok in -yes) AC_MSG_RESULT(yes) ;; -no) AC_MSG_RESULT(no) - AC_MSG_WARN(ftime seems to be buggy) ;; -runtime) AC_MSG_RESULT(will check at run time) ;; -esac -]) -if test $uucp_cv_sys_ftime_ok = yes || test $uucp_cv_sys_ftime_ok = runtime; then - AC_DEFINE(HAVE_FTIME, 1, [Whether you have ftime]) -fi -dnl AC_CHECK_FUNCS(times) AC_CHECK_FUNCS(napms nap usleep poll select) if test $ac_cv_func_napms != yes \ ++++++ fix-proty-gcc33.patch ++++++ Index: proty.c =================================================================== RCS file: /var/cvs/weasel/debian/uucp/proty.c,v retrieving revision 1.1.1.3 retrieving revision 1.2 diff -u -r1.1.1.3 -r1.2 --- proty.c 12 Oct 2003 23:29:46 -0000 1.1.1.3 +++ proty.c 13 Mar 2004 18:37:37 -0000 1.2 @@ -606,12 +606,7 @@ #endif #endif -#ifdef I386_ASM -#define ROTATE(i) \ - asm ("rolw $1,%0" : "=g" (i) : "g" (i)) -#else #define ROTATE(i) i += i + ((i & 0x8000) >> 15) -#endif static unsigned short iychecksum (z, c) ++++++ suucp.service ++++++ [Unit] Description=SSL tunnel for UUCP After=syslog.target network.target # The config needs to be adjusted by the admin, see example file in /etc/uucp/ # Just an proposal without any without obligation, without any warranty, and # at your own risk: # # Creation of /etc/uucp/stunnel.pem used in /etc/uucp/suucp-server.conf(.systemd) # > umask 066 # > cp -p /etc/uucp/suucp-server.conf.example /etc/uucp/suucp-server.conf # > openssl req -new -x509 -days 3650 -utf8 -nodes -keyout /etc/uucp/stunnel.pem -out /etc/uucp/stunnel.pem # > dd if=/dev/urandom count=4 | openssl dhparam -rand - 1024 >> /etc/uucp/stunnel.pem # # Fingerprint and hash # > openssl x509 -text -subject -dates -fingerprint -noout -in /etc/uucp/stunnel.pem # > ln -sf stunnel.pem /etc/uucp/$(openssl x509 -hash -noout -in /etc/uucp/stunnel.pem).0 # ConditionPathExists=/etc/uucp/suucp-server.conf [Service] # As long as forking is off in configuration of stunnel Type=simple ExecStart=/usr/sbin/stunnel /etc/uucp/suucp-server.conf TimeoutSec=600 PrivateTmp=true [Install] WantedBy=multi-user.target ++++++ uucp-1.07-configure.patch ++++++ --- configure.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- configure.in +++ configure.in 2017-04-04 13:41:00.208256684 +0000 @@ -356,7 +356,13 @@ AC_CHECK_FUNCS(strchr strrchr index rind AC_CHECK_FUNCS(strdup strcasecmp strncasecmp stricmp strnicmp) AC_CHECK_FUNCS(bsearch vfprintf) AC_CHECK_FUNCS(remove ftruncate ltrunc rename opendir dup2 waitpid wait4) -AC_CHECK_FUNCS(sigsetjmp setret sigaction sigvec sigset) +AC_CHECK_FUNCS(setret sigaction sigvec sigset) +AC_MSG_CHECKING(for sigsetjmp) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <setjmp.h>], + [sigjmp_buf bar; sigsetjmp (bar, 0);])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_SIGSETJMP], [1], [Define if you have the sigsetjmp function.])], + [AC_MSG_RESULT(no)]) AC_CHECK_FUNCS(sigprocmask sigblock sighold getdtablesize sysconf) AC_CHECK_FUNCS(setpgrp setsid setreuid seteuid gethostname uname) AC_CHECK_FUNCS(gettimeofday ftw glob dev_info getaddrinfo) ++++++ uucp-1.07-contrib.dif ++++++ --- contrib/Makefile.uurt | 2 +- contrib/Makefile.xchat | 2 +- contrib/amiga.c | 2 +- contrib/stats.sh | 2 +- contrib/uuclean | 4 ++-- contrib/uudemon.shar | 2 +- contrib/uupoll.shar | 32 +++++++++++++++----------------- contrib/uuq.sh | 2 +- contrib/uurate.c | 3 ++- contrib/uurate.man | 6 +++--- contrib/uureroute.perl | 4 ++-- contrib/uusnap.c | 2 +- contrib/uutraf | 6 +++--- contrib/uutry | 9 +++++---- contrib/xc-conf.h-dist | 4 ++-- contrib/xchat.man | 4 ++-- 16 files changed, 43 insertions(+), 43 deletions(-) --- contrib/Makefile.uurt +++ contrib/Makefile.uurt 2017-03-31 12:12:47.894874344 +0000 @@ -3,7 +3,7 @@ # # Prefix directory for installation directories. -prefix = /usr/local +prefix = /usr # Directory where the needed .h files are installed (uucp.h ...). uucpsrcs = ../ --- contrib/Makefile.xchat +++ contrib/Makefile.xchat 2017-03-31 12:12:47.974872857 +0000 @@ -5,7 +5,7 @@ # CC=cc SHELL=/bin/sh -BIN=/usr/local/lib/uucp +BIN=/usr/lib/uucp PROGS=xchat #----------- --- contrib/amiga.c +++ contrib/amiga.c 2017-03-31 12:12:48.058871296 +0000 @@ -30,7 +30,7 @@ int main(int argc,char *argv[],char *envp) { struct passwd *pw; - char *name = {"/usr/lib/uucp/uucico.real"}; + char *name = {"/usr/lib/uucp/uucico"}; if (sysm68k(_m68k_LIMUSER,EUA_GET_LIC) == 0 ) { /* are we unlicensed? */ if (sysm68k(_m68k_LIMUSER,EUA_UUCP) == -1) { /* yes, get a "uucp" --- contrib/stats.sh +++ contrib/stats.sh 2017-03-31 12:12:48.146869661 +0000 @@ -8,7 +8,7 @@ # (since baud is not really the correct name for it and bits/s actually # depends on the number of start and stop bits etc) -grep bytes /usr/spool/uucp/Stats | grep -v 'bytes 0.00 secs' | grep -v 'failed after' | tail -80 | \ +grep bytes /var/log/uucp/Stats | grep -v 'bytes 0.00 secs' | grep -v 'failed after' | tail -80 | \ gawk ' BEGIN { printf(" UUCP transmission history:\n"); --- contrib/uuclean +++ contrib/uuclean 2017-03-31 12:12:48.218868323 +0000 @@ -3,8 +3,8 @@ # Do whatever you like with this script. # # Set some variables -bindir=/usr/local/bin -spooldir=/usr/spool/uucp +bindir=/usr/bin +spooldir=/var/spool/uucp # # Warn about all mail over two days old $(bindir)/uustat -c rmail -o 48 -N -Q -W"Unable to deliver; will try up to one week" --- contrib/uudemon.shar +++ contrib/uudemon.shar 2017-03-31 12:12:48.294866911 +0000 @@ -43,7 +43,7 @@ X X# change LIBDIR to where UUCP library/conf. files are X# change SPOOLDIR to the UUCP spool directory. It must be HDB-ish. XLIBDIR=/usr/lib/uucp; export LIBDIR -XSPOOLDIR=/usr/spool/uucp; export SPOOLDIR +XSPOOLDIR=/var/spool/uucp; export SPOOLDIR X X### no changes needed past here ### X --- contrib/uupoll.shar +++ contrib/uupoll.shar 2017-03-31 12:12:48.382865275 +0000 @@ -33,7 +33,7 @@ sed 's/^X//' << 'SHAR_EOF' > 'uupoll/Mak # borrowed and hacked from Taylor UUCP 1.04 X # Prefix directory for installation directories. -prefix = /usr/local +prefix = /usr X # The user name/group that should own the resulting executables. # Both should run suid. @@ -174,7 +174,7 @@ it was to automate the task of reschedul started by an entry in the crontab tables in just the same way uucico is started (it will start uucico): X -05 5 * * * uucp /usr/local/lib/uucp/autopoll -r1 >>/tmp/poll.log 2>&1 +05 5 * * * uucp /usr/lib/uucp/autopoll -r1 >>/tmp/poll.log 2>&1 X Any messages go to stderr or a file (if compiled with that option); in case the file could not be opened it will use stdout to tell you just that and quit. @@ -384,12 +384,10 @@ without any alias expansion done. a failing call. .SH FILES .nf -/usr/local/lib/uucp UUCP internal utilities -/usr/lib/uucp -/usr/local/bin UUCP internal utilities -/usr/bin -/usr/spool/uucp/.Status/ Status files for each site -/usr/spool/uucp/ UUCP spool area. one of its sub- +/usr/lib/uucp UUCP internal utilities +/usr/bin UUCP internal utilities +/var/log/uucp/Stats Status file for each site +/var/spool/uucp/ UUCP spool area. one of its sub- X directories will hold the null jobs. /tmp/poll.log This file is present only if autopoll X has been compiled to place the messages @@ -1672,15 +1670,15 @@ X /* Define the complete path to the uuname program. X * If undefined we'll use just the name 'uuname' to call it X * */ -#define UNAME_DIR "/usr/local/bin/uuname" +#define UNAME_DIR "/usr/bin/uuname" X /* define the path to the directory which does contain uucico */ -#define CICO_DIR "/usr/local/lib/uucp/uucico" +#define CICO_DIR "/usr/lib/uucp/uucico" X /* define the path to the directory which holds all the uucp files. X * We'll place the poll file in one of it's subdirectories X * */ -#define SPOOL_DIR "/usr/spool/uucp" +#define SPOOL_DIR "/var/spool/uucp" X /* at least one of the follwing must be defined To use the second or X * third set of definitions, change the ``#if 1'' to ``#if 0'' @@ -1724,7 +1722,7 @@ X X * This will assure that we get the one we want X * The path must be the same as given in Makefile (lbindir) X * */ -#define AUTO_DIR "/usr/local/lib/uucp/autopoll" +#define AUTO_DIR "/usr/lib/uucp/autopoll" X /* define the path to the directory which is to contain the X * message log created by autopoll and the file name itself. @@ -1737,11 +1735,11 @@ X /* define the full path to the directory which holds the status files X * The name should be given *except* the sitename. A trailing `/' if any X * must be given. -X * Example: /usr/spool/uucp/.Status/sys.sitename +X * Example: /var/spool/uucp/.Status/sys.sitename X * then specify STATUS_DIR as -X * "/usr/spool/uucp/.Status/sys." +X * "/var/spool/uucp/.Status/sys." X * */ -#define STATUS_DIR "/usr/spool/uucp/.Status/" +#define STATUS_DIR "/var/spool/uucp/.Status/" #endif SHAR_EOF chmod 0444 uupoll/conf.h || @@ -1906,10 +1904,10 @@ for .IR all sites given. That may lead to a `No port available' condition. .SH FILES -.ta \w'/usr/spool/uucp/ 'u +.ta \w'/var/spool/uucp/ 'u .nf /etc/uucp/ UUCP internal files/utilities -/usr/spool/uucp/ Spool directory +/var/spool/uucp/ Spool directory /tmp/poll.log This file is present only if uupoll has been X compiled to place the messages into a file. X Otherwise all messages will go to stderr. --- contrib/uuq.sh +++ contrib/uuq.sh 2017-03-31 12:12:48.462863788 +0000 @@ -4,7 +4,7 @@ # note - uses the uuname script or similar functionality. # Zacharias Beckman -SPOOLDIR="/usr/spool/uucp" +SPOOLDIR="/var/spool/uucp" SYSTEMS=`uuname` TMPFILE="/tmp/uuq.tmp" FORSYSTEM="" --- contrib/uurate.c +++ contrib/uurate.c 2017-03-31 12:13:13.474399028 +0000 @@ -216,7 +216,7 @@ struct Protocol_Summary struct Host_entry { struct Host_entry *next; - char Hostname[32]; + char Hostname[MAXHOSTNAMELEN]; struct Execution_Command *cmds; /* Local Activities */ struct Phone_Call call[2]; /* In & Out Activities */ struct Protocol_Summary *proto; @@ -307,6 +307,7 @@ int main(argc, argv) int sent, called = IN; int report = 0; /* if <= 0 give msg that no report was avail. */ int junk; + extern int getopt(); /* -------------------------------------------------------------------- * P r o l o g --- contrib/uurate.man +++ contrib/uurate.man 2017-03-31 12:12:48.630860667 +0000 @@ -1,4 +1,4 @@ -''' $Id: uurate.man,v 1.4 1993/09/28 17:38:31 kdburg Rel $ +'\" $Id: uurate.man,v 1.4 1993/09/28 17:38:31 kdburg Rel $ .TH uurate 1 .SH NAME uurate \- Report Taylor UUCP statistics @@ -252,8 +252,8 @@ configuration file, so these are only ap .nf .in +.3in .ta 2.2i -.IR "/usr/spool/uucp/Log " "V2/Taylor format call/execution log," -.IR "/usr/spool/uucp/Stats " "V2/Taylor format file transfer log." +.IR "/var/log/uucp/Log " "V2/Taylor format call/execution log," +.IR "/var/log/uucp/Stats " "V2/Taylor format file transfer log." .SS "SEE ALSO" .IR uucico "(8)" .SS BUGS --- contrib/uureroute.perl +++ contrib/uureroute.perl 2017-03-31 12:12:48.702859328 +0000 @@ -34,7 +34,7 @@ $USAGE = " # "; -$UUSTAT = "uustat"; +$UUSTAT = "/usr/bin/uustat"; $SHELL = "/bin/sh"; $SMAIL = "/bin/smail"; @@ -61,7 +61,7 @@ if (!$verbose) while ($system = shift) { $sysprefix = substr ($system, 0, 7); - $directory = "/usr/spool/uucp/$sysprefix"; + $directory = "/var/spool/uucp/$sysprefix"; open (UUSTAT, "$UUSTAT -s $system -c rmail |"); print "set -ex\n"; while (<UUSTAT>) --- contrib/uusnap.c +++ contrib/uusnap.c 2017-03-31 12:12:48.786857768 +0000 @@ -11,7 +11,7 @@ At the moment it only works with taylor config and taylor dirs compile it form the Makefile or: - cc -c -g -pipe -O -I. -I. -DNEWCONFIGLIB=\"/usr/local/lib/uucp\" uusnap.c + cc -c -g -pipe -O -I. -I. -DNEWCONFIGLIB=\"/usr/lib/uucp\" uusnap.c cc -o uusnap uusnap.o For this, uusnap.[ch] must be in the same directory as uucp.h and so. --- contrib/uutraf +++ contrib/uutraf 2017-03-31 12:12:48.870856207 +0000 @@ -52,21 +52,21 @@ if ( $ARGV[0] =~ /^-/ ) { } if ( $uucp_type eq "taylor" || $uucp_type eq "gnu" ) { - @ARGV = ("/usr/local/spool/uucp/Stats") unless $#ARGV >= 0; + @ARGV = ("/var/log/uucp/Stats") unless $#ARGV >= 0; $pat = "^[^ ]+ ([^ ]+) \\(([-0-9:\\/ .]+)\\) " . "(sent|received) (\\d+) bytes in (\\d+)\\.(\\d+) seconds"; $uucp_type = 0; $recv = "received"; } elsif ( $uucp_type eq "hdb" || $uucp_type eq "bnu" ) { - @ARGV = ("/usr/spool/uucp/.Admin/xferstats") unless $#ARGV >= 0; + @ARGV = ("/var/spool/uucp/.Admin/xferstats") unless $#ARGV >= 0; $pat = "^([^!]+)![^(]+\\(([-0-9:\\/]+)\\).+([<>])-? " . "(\\d+) \\/ (\\d+)\\.(\\d+) secs"; $uucp_type = 1; $recv = "<"; } elsif ( $uucp_type eq "bsd" || $uucp_type eq "v7" ) { - @ARGV = ("/usr/spool/uucp/SYSLOG") unless $#ARGV >= 0; + @ARGV = ("/var/spool/uucp/SYSLOG") unless $#ARGV >= 0; $pat = "^[^ ]+ ([^ ]+) \\(([-0-9:\\/]+)\\) \\([^)]+\\) " . "(sent|received) (\\d+) b (\\d+) secs"; $uucp_type = 2; --- contrib/uutry +++ contrib/uutry 2017-03-31 12:12:48.954854646 +0000 @@ -14,10 +14,11 @@ # The following variables should be gropped from the configuration # files rather then being hard coded here. # -Spool=/usr/spool/uucp -Lib=/usr/local/lib/uucp -Status=$Spool/.Status -Debug=$Spool/Debug +Spool=/var/spool/uucp +Lib=/usr/lib/uucp +Log=/var/log +Status=$Log/Stats +Debug=$Log/Debug Uucico=$Lib/uucico # # Default option values --- contrib/xc-conf.h-dist +++ contrib/xc-conf.h-dist 2017-03-31 12:12:49.038853084 +0000 @@ -26,7 +26,7 @@ * executed. Normally, this is the same place you put your config * and system files for UUCP. */ -#define SCRIPT_DIR "/usr/local/conf/uucp/" /* MUST HAVE TRAILING "/" */ +#define SCRIPT_DIR "/etc/uucp/" /* MUST HAVE TRAILING "/" */ /* * The following definition establishes the default path to the @@ -34,5 +34,5 @@ * this is the same location you configured Taylor UUCP to put its * log files. */ -#define LOG_DIR "/usr/spool/uucp/" /* MUST HAVE TRAILING "/" */ +#define LOG_DIR "/var/log/uucp/" /* MUST HAVE TRAILING "/" */ --- contrib/xchat.man +++ contrib/xchat.man 2017-03-31 12:12:49.114851672 +0000 @@ -14,7 +14,7 @@ script. If begins with ``/'', then it is assumed to be a full path name for the script file. If not, a configuration-dependent default directory path (usually -.B "/usr/local/conf/uucp/" +.B "/etc/uucp/" ) is prepended to the script file name. Normally, the default path is the same as that for the Taylor UUCP configuration files. .SH DESCRIPTION @@ -163,7 +163,7 @@ If begins with ``/'', it is assumed to be an absolute path name for the debugging file. If not, then a configuration-dependent default directory path (usually -.B "/usr/spool/uucp" +.B "/var/spool/uucp" ) is prepended to .I xstr. Normally the default path is that of the directory where Taylor UUCP ++++++ uucp-1.07-cu.patch ++++++ --- cu.c +++ cu.c Thu Jun 26 18:39:05 2003 @@ -565,6 +565,11 @@ sinfo.zline = zline; if (zport != NULL || zline != NULL || ibaud != 0L) { + /* Make sure _everything_ is initialized to zero. + * Otherwise some fields (such as uuconf_fcarrier) + * will be random. */ + memset(&sport, 0, sizeof(sport)); + iuuconf = uuconf_find_port (puuconf, zport, ibaud, 0L, icuport_lock, (pointer) &sinfo, &sport); ++++++ uucp-1.07-grade.patch ++++++ --- uucico.8 +++ uucico.8 Thu Jun 26 18:29:36 2003 @@ -145,6 +145,9 @@ .B \-f, \-\-force Ignore any required wait for any systems to be called. .TP 5 +.B \-g, \-\-grade +Limit outgoing call to a given grade. +.TP 5 .B \-l, \-\-prompt Prompt for login name and password using "login: " and "Password:". This allows --- uucico.c +++ uucico.c Thu Jun 26 18:29:58 2003 @@ -125,6 +125,9 @@ struct sconnection *qconn; }; +/* min. grade set on commandline */ +static char cmdlgrade = '\0'; + /* Local functions. */ static void uusage P((void)); @@ -175,6 +178,7 @@ { "nodetach", no_argument, NULL, 'D' }, { "loop", no_argument, NULL, 'e' }, { "force", no_argument, NULL, 'f'}, + { "grade", required_argument, NULL, 'g'}, { "stdin", required_argument, NULL, 'i' }, { "prompt", no_argument, NULL, 'l' }, { "port", required_argument, NULL, 'p' }, @@ -249,9 +253,9 @@ ++zProgram; #if COHERENT_C_OPTION - zopts = "c:CDefi:I:lp:qr:s:S:u:x:X:vwz"; + zopts = "c:CDefg:i:I:lp:qr:s:S:u:x:X:vwz"; #else - zopts = "cCDefi:I:lp:qr:s:S:u:x:X:vwz"; + zopts = "cCDefg:i:I:lp:qr:s:S:u:x:X:vwz"; #endif while ((iopt = getopt_long (argc, argv, zopts, @@ -292,6 +296,14 @@ failed call. */ fforce = TRUE; break; + + case 'g': + /* Force a grade */ + if (isalpha(optarg[0])) + cmdlgrade = optarg[0]; + else + fprintf (stderr, "%s: invalid grade \n", zProgram); + break; case 'i': /* Type of port to use for standard input. Only TLI is @@ -796,6 +808,7 @@ printf ("Usage: %s [options]\n", zProgram); printf (" -s,-S,--system system: Call system (-S implies -f)\n"); printf (" -f,--force: Force call despite system status\n"); + printf (" -g,--grade: Limit outgoing call to a given grade\n"); printf (" -r state: 1 for master, 0 for slave (default)\n"); printf (" --master: Act as master\n"); printf (" --slave: Act as slave (default)\n"); @@ -1369,12 +1382,18 @@ boolean fret; /* Determine the grade we should request of the other system. A - '\0' means that no restrictions have been made. */ - if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival, - (int *) NULL)) - bgrade = '\0'; + '\0' means that no restrictions have been made. + If a grade is set on the command line, the calltimegrade-value + is overwritten. */ + + if (cmdlgrade != '\0') + bgrade = cmdlgrade; else - bgrade = (char) ival; + if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival, + (int *) NULL)) + bgrade = '\0'; + else + bgrade = (char) ival; /* Determine the name we will call ourselves. */ if (qsys->uuconf_zlocalname != NULL) ++++++ uucp-1.07-initgroups.patch ++++++ --- unix/init.c | 16 ++++++++++++++-- unix/spawn.c | 18 +++++++++++++++--- unix/uid.c | 11 +++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) --- unix/init.c +++ unix/init.c 2017-04-01 08:29:41.877900913 +0000 @@ -30,6 +30,7 @@ #include "sysdep.h" #include <errno.h> +#include <grp.h> #include <pwd.h> #if HAVE_FCNTL_H @@ -272,7 +273,11 @@ usysdep_initialize (puuconf,iflags) { q = getpwnam (OWNER); if (q != NULL) - setuid (q->pw_uid); + { + if (q->pw_name) + initgroups (q->pw_name, q->pw_gid); + setuid (q->pw_uid); + } } if ((iflags & INIT_GETCWD) != 0) @@ -370,7 +375,14 @@ usysdep_exit (fsuccess) boolean fsysdep_other_config (z) const char *z ATTRIBUTE_UNUSED; { - (void) setuid (getuid ()); + struct passwd *q; + uid_t uid = getuid (); + + q = getpwuid (uid); + if (q && q->pw_name) + initgroups (q->pw_name, q->pw_gid); + + (void) setuid (uid); (void) setgid (getgid ()); return TRUE; } --- unix/spawn.c +++ unix/spawn.c 2017-04-01 08:11:14.802602723 +0000 @@ -28,6 +28,8 @@ #include "sysdep.h" #include <errno.h> +#include <grp.h> +#include <pwd.h> #if HAVE_FCNTL_H #include <fcntl.h> @@ -113,6 +115,8 @@ ixsspawn (pazargs, aidescs, fkeepuid, fk int aichild_close[3]; pid_t iret = 0; const char *zcmd; + uid_t uid; + struct passwd *pw; /* If we might have to use the shell, allocate enough space for the quoted command before forking. Otherwise the allocation would @@ -352,7 +356,11 @@ ixsspawn (pazargs, aidescs, fkeepuid, fk if (! fkeepuid) { /* Return to the uid of the invoking user. */ - (void) setuid (getuid ()); + uid = getuid (); + pw = getpwuid (uid); + if (pw && pw->pw_name) + initgroups (pw->pw_name, pw->pw_gid); + (void) setuid (uid); (void) setgid (getgid ()); } else @@ -368,11 +376,15 @@ ixsspawn (pazargs, aidescs, fkeepuid, fk Fixing this problem would seem to require a special setuid root program; I have not used this approach because modern systems should not suffer from it. */ + uid = geteuid (); + pw = getpwuid (uid); + if (pw && pw->pw_name) + initgroups (pw->pw_name, pw->pw_gid); #if HAVE_SETREUID - (void) setreuid (geteuid (), -1); + (void) setreuid (uid, -1); (void) setregid (getegid (), -1); #else - (void) setuid (geteuid ()); + (void) setuid (uid); (void) setgid (getegid ()); #endif } --- unix/uid.c +++ unix/uid.c 2017-04-01 08:31:20.292059493 +0000 @@ -28,6 +28,8 @@ #include "sysdep.h" #include <errno.h> +#include <grp.h> +#include <pwd.h> /* NetBSD apparently does not support setuid as required by POSIX when using saved setuid, so use seteuid instead. */ @@ -45,6 +47,7 @@ fsuser_perms (pieuid, piegid) { uid_t ieuid, iuid; gid_t iegid, igid; + struct passwd *pw; ieuid = geteuid (); iuid = getuid (); @@ -57,6 +60,14 @@ fsuser_perms (pieuid, piegid) *piegid = iegid; #if HAVE_SETREUID + pw = getpwuid (ieuid); +#else + pw = getpwuid (iuid); +#endif + if (pw && pw->pw_name) + initgroups (pw->pw_name, pw->pw_gid); + +#if HAVE_SETREUID /* Swap the effective user id and the real user id. We can then swap them back again when we want to return to the uucp user's permissions. */ ++++++ uucp-1.07-lfs.patch ++++++ --- uucp-1.07/unix/fsusg.h.lfs 2003-05-29 08:08:49.000000000 +0200 +++ uucp-1.07/unix/fsusg.h 2005-07-14 15:18:50.000000000 +0200 @@ -19,13 +19,19 @@ Taylor UUCP. */ /* Space usage statistics for a filesystem. Blocks are 512-byte. */ + +#if ! HAVE_SYS_STATVFS_H /* not SVR4. */ +typedef long fsblkcnt_t; +typedef long fsfilcnt_t; +#endif + struct fs_usage { - long fsu_blocks; /* Total blocks. */ - long fsu_bfree; /* Free blocks available to superuser. */ - long fsu_bavail; /* Free blocks available to non-superuser. */ - long fsu_files; /* Total file nodes. */ - long fsu_ffree; /* Free file nodes. */ + fsblkcnt_t fsu_blocks; /* Total blocks. */ + fsblkcnt_t fsu_bfree; /* Free blocks available to superuser. */ + fsblkcnt_t fsu_bavail; /* Free blocks available to non-superuser. */ + fsfilcnt_t fsu_files; /* Total file nodes. */ + fsfilcnt_t fsu_ffree; /* Free file nodes. */ }; extern int get_fs_usage P((char *path, char *disk, struct fs_usage *fsp)); --- uucp-1.07/unix/fsusg.c.lfs 2003-05-29 08:08:49.000000000 +0200 +++ uucp-1.07/unix/fsusg.c 2005-07-14 15:02:27.000000000 +0200 @@ -90,16 +90,16 @@ #if ! STAT_NONE -static long adjust_blocks P((long blocks, int fromsize, int tosize)); +static fsblkcnt_t adjust_blocks P((fsblkcnt_t blocks, unsigned long fromsize, unsigned long tosize)); /* Return the number of TOSIZE-byte blocks used by BLOCKS FROMSIZE-byte blocks, rounding away from zero. TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */ -static long +static fsblkcnt_t adjust_blocks (blocks, fromsize, tosize) - long blocks; - int fromsize, tosize; + fsblkcnt_t blocks; + unsigned long fromsize, tosize; { if (tosize <= 0) abort (); ++++++ uucp-1.07-lockdev.patch ++++++ Index: unix/serial.c =================================================================== --- unix/serial.c.orig +++ unix/serial.c @@ -126,6 +126,10 @@ const char serial_rcsid[] = "$Id: serial #include <sys/termiox.h> #endif +#if HAVE_LOCKDEV +#include <ttylock.h> +#endif + /* Get definitions for both O_NONBLOCK and O_NDELAY. */ #ifndef O_NDELAY #ifdef FNDELAY @@ -623,6 +627,20 @@ fsserial_lockfile (flok, qconn) z = zalc; } #else /* ! HAVE_QNX_LOCKFILES */ +#if HAVE_LOCKDEV + { + int rc; + + if (flok) + rc = ttylock(qsysdep->zdevice); + else + rc = ttyunlock(qsysdep->zdevice); + if (rc) + ulog (LOG_ERROR, "tty%slock (%s): %s", flok?"":"un", qsysdep->zdevice, strerror (-rc)); + fret = (rc == 0 ? TRUE : FALSE); + return fret; + } +#else /* ! HAVE_LOCKDEV */ #if ! HAVE_SVR4_LOCKFILES { const char *zbase; @@ -660,6 +678,7 @@ fsserial_lockfile (flok, qconn) z = zalc; } #endif /* HAVE_SVR4_LOCKFILES */ +#endif /* ! HAVE_LOCKDEV */ #endif /* ! HAVE_QNX_LOCKFILES */ } Index: Makefile.am =================================================================== --- Makefile.am.orig +++ Makefile.am @@ -25,7 +25,7 @@ endif AM_CFLAGS = $(WARN_CFLAGS) $(UUDIRFLAGS) -LDADD = unix/libunix.a uuconf/libuuconf.a lib/libuucp.a +LDADD = unix/libunix.a uuconf/libuuconf.a lib/libuucp.a $(LOCKDEV_LIBS) UUHEADERS = uucp.h uudefs.h uuconf.h policy.h system.h sysdep.h getopt.h Index: configure.in =================================================================== --- configure.in.orig +++ configure.in @@ -787,4 +787,6 @@ else AC_SYS_LONG_FILE_NAMES fi dnl +PKG_CHECK_MODULES([LOCKDEV], [lockdev], AC_DEFINE([HAVE_LOCKDEV],[1],[Define if you have lockdev])) +dnl AC_OUTPUT(Makefile uuconf/Makefile lib/Makefile unix/Makefile) ++++++ uucp-1.07-sigfpe2.patch ++++++ --- uucp-1.07/log.c.sigfpe2 2005-03-13 09:35:52.500596891 +0100 +++ uucp-1.07/log.c 2005-03-13 09:38:26.414639470 +0100 @@ -671,8 +671,8 @@ } /* On a system which can determine microseconds we might very well - have both csecs == 0 and cmicros == 0. */ - if (csecs == 0 && cmicros < 1000) + have both csecs == 0 and cmicros == 0. */ + if (csecs < 0 || (csecs == 0 && cmicros < 1000)) cbps = 0; else { ++++++ uucp-1.07.dif ++++++ ++++ 1309 lines (skipped) ++++++ uucp-rpmlintrc ++++++ addFilter(".*name-repeated-in-summary.*") addFilter(".*binary-or-shlib-calls-gethostbyname.*") addFilter(".*systemd-service-without-service_.*[email protected].*") addFilter(".*hidden-file-or-dir.*/etc/uucp/.bashrc.*") addFilter(".*tmpfile-not-in-filelist.*/run/.*") ++++++ uucp-texinfo-5.0.patch ++++++ Index: uucp-1.07/uucp.texi =================================================================== --- uucp-1.07.orig/uucp.texi +++ uucp-1.07/uucp.texi @@ -4230,7 +4230,7 @@ may be sent to the remote system upon re @table @code -@itemx speed @var{number} +@item speed @var{number} @findex speed in sys file @item baud @var{number} @findex baud in sys file @@ -5119,7 +5119,7 @@ the port name is taken as the device. D dependent. On Unix, a modem or direct connection might be something like @file{/dev/ttyd0}; a TLI port might be @file{/dev/inet/tcp}. -@itemx speed @var{number} [modem and direct only ] +@item speed @var{number} [modem and direct only ] @findex speed in port file @item baud @var{number} [ modem and direct only ] @findex baud in port file @@ -5129,7 +5129,7 @@ name, then all ports which match the spe the speed is not specified here and is not specified by the system, the natural speed of the port will be used by default. -@itemx speed-range @var{number} @var{number} [ modem only ] +@item speed-range @var{number} @var{number} [ modem only ] @findex speed-range @item baud-range @var{number} @var{number} [ modem only ] @findex baud-range ++++++ uucp.bashrc ++++++ umask 0066 ++++++ uucp.pam ++++++ # # The PAM configuration file for uucpd logins # auth include common-auth account include common-account session include common-session ++++++ uucp.socket ++++++ [Unit] Description=UUCP Tcp Server Activation Socket [Socket] ListenStream=540 Accept=true [Install] WantedBy=sockets.target ++++++ uucp.tmpfiles ++++++ # /run/lock/uucp is to serialize out and in connections for Unix to Unix copy d /run/lock/uucp 0750 uucp uucp - ++++++ [email protected] ++++++ [Unit] Description=UUCP Tcp Server After=local-fs.target [Service] User=uucp ExecStart=/usr/sbin/uucico -l StandardInput=socket ++++++ uucpman.sh ++++++ #!/bin/bash for man in uucp.1 uux.1 uustat.1 uuname.1 uulog.1 uuto.1 uupick.1 \ cu.1 uucico.8 uuxqt.8 uuchk.1 uuconv.1 uusched.8 do test -e $man && continue touch .#$man ( echo NAME echo "${man%.[0-9]} - " echo SYNOPSIS info -f ./uucp.info "Invoking ${man%.[0-9]}" | tail -n +5 ) | \ rman -n ${man%.[0-9]} -s ${man#*.} -K -f roff > $man echo $man done ++++++ xinetd.uucp ++++++ # # The Internet UUCP service. # # Find UUCP config examples at # /usr/share/doc/packages/uucp/cfg_example/taylor_config/ # service uucp { disable = yes socket_type = stream protocol = tcp # bind = localhost wait = no user = uucp group = uucp server = /usr/lib/uucp/uucico server_args = -l } # The config needs to be adjusted by the admin, see example file in /etc/uucp/ # Just an proposal without any without obligation, without any warranty, and # at your own risk: # # Creation of /etc/uucp/stunnel.pem used in /etc/uucp/suucp-server.conf # > su - uucp # > test -e suucp-server.conf || cp -p suucp-server.conf.example suucp-server.conf # > openssl req -new -x509 -days 3650 -utf8 -nodes -keyout stunnel.pem -out stunnel.pem # > dd if=/dev/urandom count=4 | openssl dhparam -rand - 1024 >> stunnel.pem # # Fingerprint and hash # > su - uucp # > openssl x509 -text -subject -dates -fingerprint -noout -in stunnel.pem # > ln -sf stunnel.pem /etc/uucp/$(openssl x509 -hash -noout -in stunnel.pem).0 # service suucp { disable = yes socket_type = stream protocol = tcp wait = no user = root group = root server = /usr/sbin/stunnel server_args = /etc/uucp/suucp-server.conf }
