[arch-commits] Commit in tftp-hpa/repos (8 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 9 21:06:38 UTC 2018


    Date: Friday, November 9, 2018 @ 21:06:37
  Author: felixonmars
Revision: 338515

archrelease: copy trunk to staging-x86_64

Added:
  tftp-hpa/repos/staging-x86_64/
  tftp-hpa/repos/staging-x86_64/LICENSE
    (from rev 338514, tftp-hpa/trunk/LICENSE)
  tftp-hpa/repos/staging-x86_64/PKGBUILD
    (from rev 338514, tftp-hpa/trunk/PKGBUILD)
  tftp-hpa/repos/staging-x86_64/tftp-hpa-0.49-fortify-strcpy-crash.patch
    (from rev 338514, tftp-hpa/trunk/tftp-hpa-0.49-fortify-strcpy-crash.patch)
  tftp-hpa/repos/staging-x86_64/tftpd.conf
    (from rev 338514, tftp-hpa/trunk/tftpd.conf)
  tftp-hpa/repos/staging-x86_64/tftpd.install
    (from rev 338514, tftp-hpa/trunk/tftpd.install)
  tftp-hpa/repos/staging-x86_64/tftpd.service
    (from rev 338514, tftp-hpa/trunk/tftpd.service)
  tftp-hpa/repos/staging-x86_64/tftpd.socket
    (from rev 338514, tftp-hpa/trunk/tftpd.socket)

------------------------------------------+
 LICENSE                                  |   32 ++++++++++++++++++
 PKGBUILD                                 |   49 +++++++++++++++++++++++++++++
 tftp-hpa-0.49-fortify-strcpy-crash.patch |   26 +++++++++++++++
 tftpd.conf                               |    1 
 tftpd.install                            |    6 +++
 tftpd.service                            |   11 ++++++
 tftpd.socket                             |    9 +++++
 7 files changed, 134 insertions(+)

Copied: tftp-hpa/repos/staging-x86_64/LICENSE (from rev 338514, tftp-hpa/trunk/LICENSE)
===================================================================
--- staging-x86_64/LICENSE	                        (rev 0)
+++ staging-x86_64/LICENSE	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1983, 1993
+ *      The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by the University of
+ *      California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */

Copied: tftp-hpa/repos/staging-x86_64/PKGBUILD (from rev 338514, tftp-hpa/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1,49 @@
+# Maintainer: dorphell <dorphell at archlinux.org>
+# Contributor: Jose Javier  <jojapa at terra.es>
+
+pkgname=tftp-hpa
+pkgver=5.2
+pkgrel=7
+pkgdesc="Official tftp server"
+arch=('x86_64')
+url="http://www.kernel.org/pub/software/network/tftp/tftp-hpa/"
+license=('BSD')
+backup=('etc/conf.d/tftpd')
+install='tftpd.install'
+depends=('readline>=6.0.00')
+source=(http://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.gz 
+       LICENSE
+       tftpd.conf
+       tftpd.service
+       tftpd.socket
+       tftp-hpa-0.49-fortify-strcpy-crash.patch)
+md5sums=('3de3038e7c2bf6fc5d496825893ac8e7'
+         '6ce21e27b6fdc1a1adf85c81e42aeecf'
+         'b372088e550683df5ea8528ca6bbed1f'
+         'ddd0028f77f131f3839bde92202305c4'
+         'b04b9eb0bd049fa59dd518587a26d1c4'
+         '22e8629ef19bc276a102c5d4d284c1bd')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  # fix #28103
+  patch -Np1 -i ../tftp-hpa-0.49-fortify-strcpy-crash.patch
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin --without-tcpwrappers 
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make INSTALLROOT="${pkgdir}" install
+  install -D -m644 "${srcdir}/tftpd.conf" "$pkgdir/etc/conf.d/tftpd"
+  install -d "${pkgdir}/srv/tftp"
+  install -D -m644 "${srcdir}/tftpd.service" "${pkgdir}/usr/lib/systemd/system/tftpd.service"
+  install -D -m644 "${srcdir}/tftpd.socket" "${pkgdir}/usr/lib/systemd/system/tftpd.socket"
+  install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  # Remove conflict with iputils
+  rm "${pkgdir}/usr/share/man/man8/tftpd.8"  
+}

Copied: tftp-hpa/repos/staging-x86_64/tftp-hpa-0.49-fortify-strcpy-crash.patch (from rev 338514, tftp-hpa/trunk/tftp-hpa-0.49-fortify-strcpy-crash.patch)
===================================================================
--- staging-x86_64/tftp-hpa-0.49-fortify-strcpy-crash.patch	                        (rev 0)
+++ staging-x86_64/tftp-hpa-0.49-fortify-strcpy-crash.patch	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1,26 @@
+diff -urN tftp-hpa-0.49.orig/tftp/tftp.c tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49.orig/tftp/tftp.c	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftp/tftp.c	2009-08-05 09:47:18.072585848 -0400
+@@ -279,15 +279,16 @@
+             struct tftphdr *tp, const char *mode)
+ {
+     char *cp;
++    size_t len;
+ 
+     tp->th_opcode = htons((u_short) request);
+     cp = (char *)&(tp->th_stuff);
+-    strcpy(cp, name);
+-    cp += strlen(name);
+-    *cp++ = '\0';
+-    strcpy(cp, mode);
+-    cp += strlen(mode);
+-    *cp++ = '\0';
++    len = strlen(name) + 1;
++    memcpy(cp, name, len);
++    cp += len;
++    len = strlen(mode) + 1;
++    memcpy(cp, mode, len);
++    cp += len;
+     return (cp - (char *)tp);
+ }
+ 

Copied: tftp-hpa/repos/staging-x86_64/tftpd.conf (from rev 338514, tftp-hpa/trunk/tftpd.conf)
===================================================================
--- staging-x86_64/tftpd.conf	                        (rev 0)
+++ staging-x86_64/tftpd.conf	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1 @@
+TFTPD_ARGS="--secure /srv/tftp/"

Copied: tftp-hpa/repos/staging-x86_64/tftpd.install (from rev 338514, tftp-hpa/trunk/tftpd.install)
===================================================================
--- staging-x86_64/tftpd.install	                        (rev 0)
+++ staging-x86_64/tftpd.install	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1,6 @@
+post_upgrade() {
+  if [ -f /etc/systemd/system/tftpd.service ]; then
+    echo ">>> TFTP server configuration has been moved to /etc/conf.d/tftpd."
+    echo "    Please update /etc/conf.d/tftpd and remove /etc/systemd/system/tftpd.service"
+  fi
+}

Copied: tftp-hpa/repos/staging-x86_64/tftpd.service (from rev 338514, tftp-hpa/trunk/tftpd.service)
===================================================================
--- staging-x86_64/tftpd.service	                        (rev 0)
+++ staging-x86_64/tftpd.service	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1,11 @@
+[Unit]
+Description=hpa's original TFTP daemon
+After=network.target
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/conf.d/tftpd
+ExecStart=/usr/bin/in.tftpd --listen $TFTPD_ARGS
+
+[Install]
+WantedBy=multi-user.target

Copied: tftp-hpa/repos/staging-x86_64/tftpd.socket (from rev 338514, tftp-hpa/trunk/tftpd.socket)
===================================================================
--- staging-x86_64/tftpd.socket	                        (rev 0)
+++ staging-x86_64/tftpd.socket	2018-11-09 21:06:37 UTC (rev 338515)
@@ -0,0 +1,9 @@
+[Unit]
+Description=hpa's original TFTP daemon
+Conflicts=tftpd.service
+
+[Socket]
+ListenDatagram=69
+
+[Install]
+WantedBy=sockets.target


More information about the arch-commits mailing list