diff options
author | Rob Austein <sra@hactrn.net> | 2016-03-20 03:15:27 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-03-20 03:15:27 +0000 |
commit | d3cb2a1152bdb9a0cb391a388c702ff2f3be8371 (patch) | |
tree | 5e2f95c9a40346bc4ede56c09baf8c9cf6f1dbd0 /rp | |
parent | 48e1f63e98c715da052364fddbe4d7f29f7bd628 (diff) |
Clean up rcynic installation, run rcynicng instead of (old) rcynic, clean up rcynic-cron.
NB: rpkigui-rcynic is currently broken and is therefore disabled in rcynic-cron.
This needs to be fixed, but it was broken on this branch in any case, no real
point in holding up the rest of this waiting for it.
svn path=/branches/tk705/; revision=6321
Diffstat (limited to 'rp')
-rw-r--r-- | rp/rcynic/Makefile.in | 80 | ||||
-rwxr-xr-x | rp/rcynic/rc-scripts/darwin/RCynic | 42 | ||||
-rw-r--r-- | rp/rcynic/rc-scripts/darwin/StartupParameters.plist | 19 | ||||
-rwxr-xr-x | rp/rcynic/rc-scripts/freebsd/rc.d.rcynic | 44 | ||||
-rwxr-xr-x | rp/rcynic/rcynic-cron | 46 | ||||
-rwxr-xr-x | rp/rcynic/rcynic-dump | 2 | ||||
-rwxr-xr-x | rp/rcynic/rcynicng | 9 | ||||
-rw-r--r-- | rp/rcynic/rules.darwin.mk | 34 | ||||
-rw-r--r-- | rp/rcynic/rules.freebsd.mk | 8 | ||||
-rw-r--r-- | rp/rcynic/rules.linux.mk | 48 | ||||
-rw-r--r-- | rp/rcynic/rules.unknown.mk | 2 | ||||
-rw-r--r-- | rp/rcynic/static-rsync/Makefile.in | 44 | ||||
-rw-r--r-- | rp/rcynic/static-rsync/README | 15 | ||||
-rw-r--r-- | rp/rcynic/static-rsync/patches/patch-CVE-2007-4091 | 60 | ||||
-rw-r--r-- | rp/rcynic/static-rsync/rsync-2.6.9.tar.gz | bin | 811841 -> 0 bytes |
15 files changed, 47 insertions, 406 deletions
diff --git a/rp/rcynic/Makefile.in b/rp/rcynic/Makefile.in index ce19ab81..52c67fde 100644 --- a/rp/rcynic/Makefile.in +++ b/rp/rcynic/Makefile.in @@ -1,17 +1,7 @@ # $Id$ -NAME = rcynic - -BIN = ${NAME} -SRC = ${NAME}.c -OBJ = ${NAME}.o - -GEN = defstack.h - -OBJS = ${OBJ} bio_f_linebreak.o - CFLAGS = @CFLAGS@ -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror-implicit-function-declaration -LDFLAGS = @LDFLAGS@ @LD_STATIC_FLAG@ +LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ AWK = @AWK@ @@ -40,49 +30,48 @@ abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir = @abs_top_builddir@ srcdir = @srcdir@ -RCYNIC_BIN_RCYNIC = @RCYNIC_BIN_RCYNIC@ +RCYNIC_BIN_RCYNIC = ${DESTDIR}${bindir}/rcynic RCYNIC_CONF_DATA = @RCYNIC_CONF_DATA@ -RCYNIC_CONF_FILE = @RCYNIC_CONF_FILE@ -RCYNIC_CONF_RSYNC = @RCYNIC_CONF_RSYNC@ -RCYNIC_CONF_TA_DIR = @RCYNIC_CONF_TA_DIR@ -RCYNIC_CRON_USER = @RCYNIC_CRON_USER@ -RCYNIC_DATA_DIR = ${RCYNIC_DIR}/data +RCYNIC_CONF_FILE = ${DESTDIR}${sysconfdir}/rcynic.conf +RCYNIC_CONF_RSYNC = @RSYNC@ +RCYNIC_CONF_TA_DIR = ${sysconfdir}/rpki/trust-anchors +RCYNIC_CRON_USER = ${RPKI_USER} +RCYNIC_DATA_DIR = ${DESTDIR}${RCYNIC_DIR}/data RCYNIC_DIR = @RCYNIC_DIR@ -RCYNIC_DIRS = ${RCYNIC_TA_DIR} ${RCYNIC_JAIL_DIRS} ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} ${RPKIRTR_DIR}/sockets +RCYNIC_DIRS = ${RCYNIC_TA_DIR} ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} ${RPKIRTR_DIR}/sockets RPKI_GECOS = RPKI System Software RPKI_GROUP = @RPKI_GROUP@ RCYNIC_HTML_DIR = @RCYNIC_HTML_DIR@ RCYNIC_INSTALL_TARGETS = @RCYNIC_INSTALL_TARGETS@ -RCYNIC_JAIL_DIRS = @RCYNIC_JAIL_DIRS@ -RCYNIC_STATIC_RSYNC = @RCYNIC_STATIC_RSYNC@ -RCYNIC_TA_DIR = @RCYNIC_TA_DIR@ +RCYNIC_TA_DIR = ${DESTDIR}${sysconfdir}/rpki/trust-anchors RPKI_USER = @RPKI_USER@ -RPKIRTR_DIR = ${RCYNIC_DIR}/rpki-rtr +RPKIRTR_DIR = ${DESTDIR}${RCYNIC_DIR}/rpki-rtr -all: ${BIN} ${RCYNIC_STATIC_RSYNC} +OBJS = rcynic.o bio_f_linebreak.o + +all: rcynicng clean: - if test -r static-rsync/Makefile; then cd static-rsync; ${MAKE} $@; fi - rm -f ${BIN} ${OBJS} + rm -f rcynic ${OBJS} -${OBJ}: ${SRC} ${GEN} +rcynic.o: rcynic.c defstack.h -${BIN}: ${OBJS} +rcynic: ${OBJS} ${CC} ${CFLAGS} -o $@ ${OBJS} ${LDFLAGS} ${LIBS} -${GEN}: ${SRC} - ${PYTHON} ${abs_top_srcdir}/buildtools/defstack.py ${SRC} >$@.tmp +defstack.h: rcynic.c + ${PYTHON} ${abs_top_srcdir}/buildtools/defstack.py rcynic.c >$@.tmp mv $@.tmp $@ tags: TAGS -TAGS: ${SRC} ${GEN} - etags ${SRC} ${GEN} +TAGS: rcynic.c defstack.h + etags rcynic.c defstack.h -test: ${BIN} +test: rcynic if test -r rcynic.conf; \ then \ - ./${BIN} -j 0 && \ + ./rcynic -j 0 && \ test -r rcynic.xml && \ echo && \ ./rcynic-text rcynic.xml; \ @@ -104,14 +93,11 @@ static-rsync/rsync: install: all ${RCYNIC_INSTALL_TARGETS} install-always: \ - install-directories install-rcynic install-rcynic-conf + install-directories install-rcynic install-tals install-postconf: \ install-user-and-group install-directory-ownership install-crontab -install-jailed: \ - install-static-rsync install-shared-libraries install-rc-scripts - install-directories: ${RCYNIC_DIRS} ${RCYNIC_DIRS} ${DESTDIR}${bindir} ${DESTDIR}${sysconfdir}: @@ -120,15 +106,18 @@ ${RCYNIC_DIRS} ${DESTDIR}${bindir} ${DESTDIR}${sysconfdir}: install-directory-ownership: ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} ${RPKIRTR_DIR}/sockets chown ${RPKI_USER}:${RPKI_GROUP} ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} ${RPKIRTR_DIR}/sockets -install-rcynic-conf: ${RCYNIC_CONF_FILE} +install-tals: + ${INSTALL} -v -d ${RCYNIC_TA_DIR} + ${INSTALL} -v -p -m 444 sample-trust-anchors/*.tal ${RCYNIC_TA_DIR} + +# We don't install rcynic.conf anymore. Keep this for now as internal documentation, +# clean up later. ${RCYNIC_CONF_FILE}: @echo - @echo Found no ${RCYNIC_CONF_FILE}, creating basic config and installing default trust anchor locators. + @echo Found no ${RCYNIC_CONF_FILE}, creating basic configuration. @echo You might want to edit this. @echo - ${INSTALL} -v -d ${RCYNIC_TA_DIR} - ${INSTALL} -v -p -m 444 sample-trust-anchors/*.tal ${RCYNIC_TA_DIR} @echo > $@.tmp '# Basic rcynic configuration file with default trust anchors.' @echo >>$@.tmp '# See documentation for details.' @echo >>$@.tmp '' @@ -147,13 +136,8 @@ ${RCYNIC_CONF_FILE}: install-rcynic: ${RCYNIC_BIN_RCYNIC} -${RCYNIC_BIN_RCYNIC}: ${BIN} - ${INSTALL} -p -m 555 ${BIN} $@ - -install-static-rsync: ${RCYNIC_DIR}/bin/rsync - -${RCYNIC_DIR}/bin/rsync: static-rsync/rsync - ${INSTALL} -p -m 555 static-rsync/rsync $@ +${RCYNIC_BIN_RCYNIC}: rcynicng + ${INSTALL} -p -m 555 rcynicng $@ .FORCE: diff --git a/rp/rcynic/rc-scripts/darwin/RCynic b/rp/rcynic/rc-scripts/darwin/RCynic deleted file mode 100755 index d486a3c3..00000000 --- a/rp/rcynic/rc-scripts/darwin/RCynic +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# -# $Id$ -# -. /etc/rc.common - -name="rcynic" -start_cmd="rcynic_start" -stop_cmd="rcynic_stop" - -: ${rcynic_dir="/var/rcynic"} - -StartService() -{ - /sbin/umount "${rcynic_dir}/dev" 2>/dev/null - - if ! /sbin/mount_devfs devfs "${rcynic_dir}/dev"; then - echo "Mounting devfs on ${rcynic_dir}/dev failed..." - exit 1 - fi - - for i in /etc/localtime /etc/resolv.conf; do - j="${rcynic_dir}${i}" - if /bin/test -r "$i" && ! /usr/bin/cmp -s "$i" "$j"; then - /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" - fi - done - - /bin/ln -f /var/run/mDNSResponder "${rcynic_dir}/var/run/mDNSResponder" -} - -StopService() -{ - /sbin/umount "${rcynic_dir}/dev" 2>/dev/null -} - -RestartService() -{ - StartService -} - -RunService "$1" diff --git a/rp/rcynic/rc-scripts/darwin/StartupParameters.plist b/rp/rcynic/rc-scripts/darwin/StartupParameters.plist deleted file mode 100644 index ca46b676..00000000 --- a/rp/rcynic/rc-scripts/darwin/StartupParameters.plist +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>Description</key> - <string>RCynic Setup</string> - <key>OrderPreference</key> - <string>None</string> - <key>Provides</key> - <array> - <string>RCynic</string> - </array> - <key>Uses</key> - <array> - <string>Network</string> - <string>Resolver</string> - </array> - </dict> -</plist> diff --git a/rp/rcynic/rc-scripts/freebsd/rc.d.rcynic b/rp/rcynic/rc-scripts/freebsd/rc.d.rcynic deleted file mode 100755 index 9b7aa545..00000000 --- a/rp/rcynic/rc-scripts/freebsd/rc.d.rcynic +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# -# $Id$ -# -# PROVIDE: rcynic -# REQUIRE: DAEMON -# KEYWORD: nojail - -. /etc/rc.subr - -name="rcynic" -start_cmd="rcynic_start" -stop_cmd="rcynic_stop" - -: ${rcynic_dir="/var/rcynic"} - -rcynic_start() -{ - /sbin/umount "${rcynic_dir}/dev" 2>/dev/null - - if ! /sbin/mount -t devfs dev "${rcynic_dir}/dev"; then - echo "Mounting devfs on ${rcynic_dir}/dev failed..." - exit 1 - fi - - /sbin/devfs -m "${rcynic_dir}/dev" rule apply hide - /sbin/devfs -m "${rcynic_dir}/dev" rule apply path null unhide - /sbin/devfs -m "${rcynic_dir}/dev" rule apply path random unhide - - for i in /etc/localtime /etc/resolv.conf; do - j="${rcynic_dir}${i}" - if /bin/test -r "$i" && ! /usr/bin/cmp -s "$i" "$j"; then - /usr/bin/install -m 444 -o root -g wheel -p "$i" "$j" - fi - done -} - -rcynic_stop() -{ - /sbin/umount "${rcynic_dir}/dev" 2>/dev/null -} - -load_rc_config $name -run_rc_command "$1" diff --git a/rp/rcynic/rcynic-cron b/rp/rcynic/rcynic-cron index fcf38e53..93abb822 100755 --- a/rp/rcynic/rcynic-cron +++ b/rp/rcynic/rcynic-cron @@ -28,28 +28,16 @@ our purposes. In theory this is portable to any Unix-like system. import os import sys -import pwd import fcntl import errno -import argparse import rpki.autoconf def run(*cmd, **kwargs): - chroot_this = kwargs.pop("chroot_this", False) cwd = kwargs.pop("cwd", None) pid = os.fork() if pid == 0: - if chroot_this: - os.chdir(rpki.autoconf.RCYNIC_DIR) - elif cwd is not None: + if cwd is not None: os.chdir(cwd) - if we_are_root: - os.initgroups(pw.pw_name, pw.pw_gid) - if chroot_this: - os.chroot(rpki.autoconf.RCYNIC_DIR) - if we_are_root: - os.setgid(pw.pw_gid) - os.setuid(pw.pw_uid) os.closerange(3, os.sysconf("SC_OPEN_MAX")) os.execvp(cmd[0], cmd) os._exit(1) # pylint: disable=W0212 @@ -64,45 +52,27 @@ def run(*cmd, **kwargs): else: sys.exit("Program %s exited for unknown reason %s" % (" ".join(cmd), status)) -parser = argparse.ArgumentParser(description = __doc__) -parser.add_argument("--chroot", action = "store_true", help = "run chrooted") -args = parser.parse_args() - -we_are_root = os.getuid() == 0 - -if args.chroot and not we_are_root: - sys.exit("Only root can --chroot") - -try: - pw = pwd.getpwnam(rpki.autoconf.RPKI_USER) -except KeyError: - sys.exit("Could not find passwd entry for user %s" % rpki.autoconf.RPKI_USER) - try: - lock = os.open(os.path.join(rpki.autoconf.RCYNIC_DIR, "data/lock"), + lock = os.open(os.path.join(rpki.autoconf.RCYNIC_DIR, "data", "lock"), os.O_RDONLY | os.O_CREAT | os.O_NONBLOCK, 0666) fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) - if we_are_root: - os.fchown(lock, pw.pw_uid, pw.pw_gid) except (IOError, OSError), e: if e.errno == errno.EAGAIN: sys.exit(0) # Another instance of this script is already running, exit silently else: sys.exit("Error %r opening lock %r" % (e.strerror, os.path.join(rpki.autoconf.RCYNIC_DIR, "data/lock"))) -if args.chroot: - run("/bin/rcynic", "-c", "/etc/rcynic.conf", chroot_this = True) -else: - run(os.path.join(rpki.autoconf.bindir, "rcynic"), "-c", os.path.join(rpki.autoconf.sysconfdir, "rcynic.conf")) +run(os.path.join(rpki.autoconf.bindir, "rcynic")) run(os.path.join(rpki.autoconf.bindir, "rpki-rtr"), "cronjob", - os.path.join(rpki.autoconf.RCYNIC_DIR, "data/authenticated"), cwd = os.path.join(rpki.autoconf.RCYNIC_DIR, "rpki-rtr")) -prog = os.path.join(rpki.autoconf.libexecdir, "rpkigui-rcynic") -if os.path.exists(prog): - run(prog) +# rpkigui-rcynic isn't working with rcynicng yet, sorry. +if False: + prog = os.path.join(rpki.autoconf.libexecdir, "rpkigui-rcynic") + if os.path.exists(prog): + run(prog) if rpki.autoconf.RCYNIC_HTML_DIR and os.path.exists(os.path.dirname(rpki.autoconf.RCYNIC_HTML_DIR)): run(os.path.join(rpki.autoconf.bindir, "rcynic-html"), diff --git a/rp/rcynic/rcynic-dump b/rp/rcynic/rcynic-dump index a217d063..0c7f898f 100755 --- a/rp/rcynic/rcynic-dump +++ b/rp/rcynic/rcynic-dump @@ -35,8 +35,6 @@ parser.add_argument("-c", "--config") parser.add_argument("output_tree", nargs = "?", default = "rcynic-data") args = parser.parse_args() -rpki.config.rpki_conf_envname = "RCYNIC_CONF" -rpki.config.default_filename = os.path.join(rpki.autoconf.sysconfdir, "rcynic.conf") rpki.config.parser(set_filename = args.config, section = "rcynic") import django diff --git a/rp/rcynic/rcynicng b/rp/rcynic/rcynicng index 2f3b4a75..b05bf0ac 100755 --- a/rp/rcynic/rcynicng +++ b/rp/rcynic/rcynicng @@ -1387,11 +1387,12 @@ def main(): cfg, parser = rpki.config.argparser(section = "rcynic", doc = __doc__, cfg_optional = True) - parser.add_argument("--authenticated", default = "rcynic-data/authenticated") - parser.add_argument("--unauthenticated", default = "rcynic-data/unauthenticated") - parser.add_argument("--xml-file", default = "rcynicng.xml", type = argparse.FileType("w")) + parser.add_argument("--unauthenticated", default = os.path.join(rpki.autoconf.RCYNIC_DIR, "data", "unauthenticated")) - parser.add_argument("--tals", default = "sample-trust-anchors") + parser.add_argument("--xml-file", default = os.path.join(rpki.autoconf.RCYNIC_DIR, "data", "rcynic.xml"), + type = argparse.FileType("w")) + + parser.add_argument("--tals", default = os.path.join(rpki.autoconf.sysconfdir, "rpki", "trust-anchors")) parser.add_argument("--workers", default = 10, type = posint) diff --git a/rp/rcynic/rules.darwin.mk b/rp/rcynic/rules.darwin.mk index b5979979..f1eed3ce 100644 --- a/rp/rcynic/rules.darwin.mk +++ b/rp/rcynic/rules.darwin.mk @@ -36,37 +36,3 @@ install-user-and-group: .FORCE echo "Please create it, then try again."; \ exit 1; \ fi - -install-shared-libraries: .FORCE - @echo "Copying required shared libraries" - @shared_libraries="${RCYNIC_DIR}/bin/rcynic ${RCYNIC_DIR}/bin/rsync"; \ - while true; \ - do \ - closure="$$(/usr/bin/otool -L $${shared_libraries} | /usr/bin/awk '/:$$/ {next} {print $$1}' | /usr/bin/sort -u)"; \ - if test "x$$shared_libraries" = "x$$closure"; - then \ - break; \ - else \ - shared_libraries="$$closure"; \ - fi; \ - done; \ - for shared in /usr/lib/dyld $$shared_libraries; \ - do \ - if /bin/test -r "${RCYNIC_DIR}/$${shared}"; \ - then \ - echo "You already have a \"${RCYNIC_DIR}/$${shared}\", so I will use it"; \ - elif /usr/bin/install -m 555 -o root -g wheel -p "$${shared}" "${RCYNIC_DIR}/$${shared}"; \ - then \ - echo "Copied $${shared} into ${RCYNIC_DIR}"; \ - else \ - echo "Unable to copy $${shared} into ${RCYNIC_DIR}"; \ - exit 1; \ - fi; \ - done - -install-rc-scripts: - ${INSTALL} -o root -g wheel -d ${DESTDIR}/Library/StartupItems/RCynic - ${INSTALL} -o root -g wheel -m 555 \ - rc-scripts/darwin/RCynic \ - rc-scripts/darwin/StartupParameters.plist \ - ${DESTDIR}/Library/Startup/RCynic diff --git a/rp/rcynic/rules.freebsd.mk b/rp/rcynic/rules.freebsd.mk index 880ce3f4..0f022a2e 100644 --- a/rp/rcynic/rules.freebsd.mk +++ b/rp/rcynic/rules.freebsd.mk @@ -23,11 +23,3 @@ install-user-and-group: .FORCE echo "Please create it, then try again."; \ exit 1; \ fi - -# We use static compilation on FreeBSD, so no need for shared libraries - -install-shared-libraries: - @true - -install-rc-scripts: - ${INSTALL} -m 555 -o root -g wheel -p rc-scripts/freebsd/rc.d.rcynic ${DESTDIR}/usr/local/etc/rc.d/rcynic diff --git a/rp/rcynic/rules.linux.mk b/rp/rcynic/rules.linux.mk index 016b0582..c116f75c 100644 --- a/rp/rcynic/rules.linux.mk +++ b/rp/rcynic/rules.linux.mk @@ -17,7 +17,7 @@ install-user-and-group: .FORCE if getent passwd ${RPKI_USER} >/dev/null; \ then \ echo "You already have a user \"${RPKI_USER}\", so I will use it."; \ - elif /usr/sbin/useradd -g ${RPKI_GROUP} -M $$nogroup -d "${RCYNIC_DIR}" -s /sbin/nologin -c "${RPKI_GECOS}" ${RPKI_USER}; \ + elif /usr/sbin/useradd -g ${RPKI_GROUP} -M $$nogroup -d "${DESTDIR}${RCYNIC_DIR}" -s /sbin/nologin -c "${RPKI_GECOS}" ${RPKI_USER}; \ then \ echo "Added user \"${RPKI_USER}\"."; \ else \ @@ -25,49 +25,3 @@ install-user-and-group: .FORCE echo "Please create it, then try again."; \ exit 1; \ fi - -# This all looks like a relic of the days when we still tried to support rcynic running in a chroot jail, which -# never really worked properly except on FreeBSD, and has since been overtaken by many other events. Do we -# still need this, even assuming anybody uses this installation instead of Debian packaging? -# -# Cleanup left for another day, but this looks pretty iffy. - -install-shared-libraries: .FORCE - @echo "Copying required shared libraries" - @if test -d /lib64; then libdir=/lib64; else libdir=/lib; fi; \ - shared_libraries="${RCYNIC_DIR}/bin/rcynic ${RCYNIC_DIR}/bin/rsync $$(/usr/bin/find $${libdir} -name 'libnss*.so*' -print)"; \ - while true; \ - do \ - closure="$$(/usr/bin/ldd $${shared_libraries} | \ - ${AWK} ' \ - { sub(/:$/, "") } \ - $$0 == "${RCYNIC_DIR}/bin/rcynic" { next } \ - $$0 == "${RCYNIC_DIR}/bin/rsync" { next } \ - $$1 ~ /\/ld-linux\.so/ { next } \ - { for (i = 1; i <= NF; i++) if ($$i ~ /^\//) print $$i } \ - ' | \ - ${SORT} -u)"; \ - if test "X$$shared_libraries" = "X$$closure"; \ - then \ - break; \ - else \ - shared_libraries="$$closure"; \ - fi; \ - done; \ - if test -f $${libdir}/libresolv.so.2; \ - then \ - shared_libraries="$${shared_libraries} $${libdir}/libresolv.so.2"; - fi; \ - for shared in $${libdir}/*ld*.so* $$shared_libraries; \ - do \ - if test ! -r "${RCYNIC_DIR}/$${shared}"; \ - then \ - ${INSTALL} -m 555 -d `dirname "${RCYNIC_DIR}$${shared}"` && \ - ${INSTALL} -m 555 -p "$${shared}" "${RCYNIC_DIR}$${shared}"; \ - fi; \ - done - -# No devfs, so no rc script - -install-rc-scripts: - @true diff --git a/rp/rcynic/rules.unknown.mk b/rp/rcynic/rules.unknown.mk index 6ce3ea18..03cbd858 100644 --- a/rp/rcynic/rules.unknown.mk +++ b/rp/rcynic/rules.unknown.mk @@ -1,4 +1,4 @@ # $Id$ -install-user-and-group install-shared-libraries install-rc-scripts: .FORCE +install-user-and-group: .FORCE @echo "Don't know how to make $@ on this platform"; exit 1 diff --git a/rp/rcynic/static-rsync/Makefile.in b/rp/rcynic/static-rsync/Makefile.in deleted file mode 100644 index 8a433c7b..00000000 --- a/rp/rcynic/static-rsync/Makefile.in +++ /dev/null @@ -1,44 +0,0 @@ -# $Id$ - -VERSION = 2.6.9 - -CFG_ENV = CFLAGS='@CFLAGS@' LDFLAGS='@LDFLAGS@ @LD_STATIC_FLAG@' -CFG_ARG = - -TARBALL = rsync-${VERSION}.tar.gz -DIRNAME = rsync-${VERSION} - -CFG_LOG = > ../config.log 2>&1 -BIN_LOG = > ../build.log 2>&1 - -BIN = rsync - -abs_top_srcdir = @abs_top_srcdir@ -abs_top_builddir = @abs_top_builddir@ - -all: ${BIN} - -${BIN}: ${DIRNAME}/${BIN} - ln ${DIRNAME}/${BIN} $@ - file $@ - -${DIRNAME}/${BIN}: configured.stamp - cd ${DIRNAME} && ${MAKE} ${BIN_LOG} - -extracted.stamp: ${TARBALL} - gzip -c -d ${TARBALL} | tar -xf - - touch $@ - -patched.stamp: extracted.stamp - for i in patches/patch-*; do if test -f "$$i"; then patch -d ${DIRNAME} <"$$i"; else :; fi; done - touch $@ - -configured.stamp: patched.stamp - cd ${DIRNAME} && ${CFG_ENV} ./configure ${CFG_ARG} ${CFG_LOG} - touch $@ - -clean: - rm -rf ${BIN} ${DIRNAME} *.stamp *.log - -distclean: clean - rm -f Makefile diff --git a/rp/rcynic/static-rsync/README b/rp/rcynic/static-rsync/README deleted file mode 100644 index 9ff5afa8..00000000 --- a/rp/rcynic/static-rsync/README +++ /dev/null @@ -1,15 +0,0 @@ -$Id$ - -Hack to build a static rsync binary suitable for use in a chroot jail. - -The default configuration is for gcc, since that's the most widely -used compiler on the platforms we use. I've provided hooks intended -to make it simple to support other compilers just by overriding make -variables on the command line: if you need to do something more -drastic than this to get your compiler working, please tell me. - -If your platform doesn't support static binaries at all, you're on -your own (and should whine at your OS vendor, as this is nuts). - -We try to stick with rsync release code, but apply security patches -when necessary. diff --git a/rp/rcynic/static-rsync/patches/patch-CVE-2007-4091 b/rp/rcynic/static-rsync/patches/patch-CVE-2007-4091 deleted file mode 100644 index 201af96a..00000000 --- a/rp/rcynic/static-rsync/patches/patch-CVE-2007-4091 +++ /dev/null @@ -1,60 +0,0 @@ ---- sender.c 2006-09-20 03:53:32.000000000 +0200 -+++ sender.c 2007-07-25 15:33:05.000000000 +0200 -@@ -123,6 +123,7 @@ - char fname[MAXPATHLEN]; - struct file_struct *file; - unsigned int offset; -+ size_t l = 0; - - if (ndx < 0 || ndx >= the_file_list->count) - return; -@@ -133,6 +134,20 @@ - file->dir.root, "/", NULL); - } else - offset = 0; -+ -+ l = offset + 1; -+ if (file) { -+ if (file->dirname) -+ l += strlen(file->dirname); -+ if (file->basename) -+ l += strlen(file->basename); -+ } -+ -+ if (l >= sizeof(fname)) { -+ rprintf(FERROR, "Overlong pathname\n"); -+ exit_cleanup(RERR_FILESELECT); -+ } -+ - f_name(file, fname + offset); - if (remove_source_files) { - if (do_unlink(fname) == 0) { -@@ -224,6 +239,7 @@ - enum logcode log_code = log_before_transfer ? FLOG : FINFO; - int f_xfer = write_batch < 0 ? batch_fd : f_out; - int i, j; -+ size_t l = 0; - - if (verbose > 2) - rprintf(FINFO, "send_files starting\n"); -@@ -259,6 +275,20 @@ - fname[offset++] = '/'; - } else - offset = 0; -+ -+ l = offset + 1; -+ if (file) { -+ if (file->dirname) -+ l += strlen(file->dirname); -+ if (file->basename) -+ l += strlen(file->basename); -+ } -+ -+ if (l >= sizeof(fname)) { -+ rprintf(FERROR, "Overlong pathname\n"); -+ exit_cleanup(RERR_FILESELECT); -+ } -+ - fname2 = f_name(file, fname + offset); - - if (verbose > 2) diff --git a/rp/rcynic/static-rsync/rsync-2.6.9.tar.gz b/rp/rcynic/static-rsync/rsync-2.6.9.tar.gz Binary files differdeleted file mode 100644 index 6377f639..00000000 --- a/rp/rcynic/static-rsync/rsync-2.6.9.tar.gz +++ /dev/null |