On 5/13/19 8:42 AM, David CARLIER wrote: > If you mention testapp executable it does not coredump. No worries if > you wanna keep the no_drop_privileges patch tho. > Regards. > > On Mon, 13 May 2019 at 07:32, Giovanni Bechis <giova...@paclan.it> wrote: >> >> On Sun, May 12, 2019 at 01:08:51PM +0100, David CARLIER wrote: >>> Hi, >>> >>> Here a proposal straight to 1.5.14, removing a patch due to >>> drop_privilege support feature. >>> >> why you removed that patch ? I think in OpenBSD dropping privileges should be >> mandatory. >> Does it pass regression tests (at least the same tests that passes with >> 1.5.6) ? >> I have a 1.5.12 port on my tree that core dumps during regression tests, I >> haven't >> checked 1.5.14 yet. >> Giovanni > New diff attached, I will commit it in a few days. Cheers Giovanni
Index: Makefile =================================================================== RCS file: /var/cvs/ports/misc/memcached/Makefile,v retrieving revision 1.45 diff -u -p -r1.45 Makefile --- Makefile 4 Sep 2018 12:46:16 -0000 1.45 +++ Makefile 13 May 2019 06:26:23 -0000 @@ -2,9 +2,8 @@ COMMENT= distributed memory object caching system -DISTNAME= memcached-1.5.6 +DISTNAME= memcached-1.5.14 CATEGORIES= misc -REVISION= 0 HOMEPAGE= https://www.memcached.org/ Index: distinfo =================================================================== RCS file: /var/cvs/ports/misc/memcached/distinfo,v retrieving revision 1.27 diff -u -p -r1.27 distinfo --- distinfo 3 Mar 2018 13:39:18 -0000 1.27 +++ distinfo 13 May 2019 06:26:23 -0000 @@ -1,2 +1,2 @@ -SHA256 (memcached-1.5.6.tar.gz) = lnXuhZ19gfepUPGQpoEnILJvCCKNNWBE7FF9TVryXwM= -SIZE (memcached-1.5.6.tar.gz) = 452038 +SHA256 (memcached-1.5.14.tar.gz) = nFvfKaeA+2xvfJ6q7toFg+/fZjGTdYw+MWyWmlEK8qk= +SIZE (memcached-1.5.14.tar.gz) = 485076 Index: patches/patch-configure =================================================================== RCS file: /var/cvs/ports/misc/memcached/patches/patch-configure,v retrieving revision 1.12 diff -u -p -r1.12 patch-configure --- patches/patch-configure 3 Mar 2018 13:39:18 -0000 1.12 +++ patches/patch-configure 13 May 2019 06:57:11 -0000 @@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.12 2018/03 Index: configure --- configure.orig +++ configure -@@ -6575,7 +6575,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h +@@ -6818,7 +6818,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h elif test "$GCC" = "yes" then GCC_VERSION=`$CC -dumpversion` Index: patches/patch-memcached_c =================================================================== RCS file: /var/cvs/ports/misc/memcached/patches/patch-memcached_c,v retrieving revision 1.16 diff -u -p -r1.16 patch-memcached_c --- patches/patch-memcached_c 3 Mar 2018 13:39:18 -0000 1.16 +++ patches/patch-memcached_c 13 May 2019 06:57:58 -0000 @@ -1,15 +1,16 @@ -$OpenBSD: patch-memcached_c,v 1.16 2018/03/03 13:39:18 sthen Exp $ +$OpenBSD$ Index: memcached.c --- memcached.c.orig +++ memcached.c -@@ -7746,6 +7746,9 @@ int main (int argc, char **argv) { - /* Drop privileges no longer needed */ - if (settings.drop_privileges) { - drop_privileges(); -+ } else { -+ fprintf(stderr, "no_drop_privileges option unsupported on this operating system.\n"); -+ exit(EXIT_FAILURE); - } - - /* Initialize the uriencode lookup table. */ +@@ -7719,8 +7719,8 @@ int main (int argc, char **argv) { + start_lru_maintainer = false; + break; + case NO_DROP_PRIVILEGES: +- settings.drop_privileges = false; +- break; ++ fprintf(stderr, "no_drop_privileges option unsupported on this operating system.\n"); ++ return 1; + case DROP_PRIVILEGES: + settings.drop_privileges = true; + break; Index: pkg/PLIST =================================================================== RCS file: /var/cvs/ports/misc/memcached/pkg/PLIST,v retrieving revision 1.12 diff -u -p -r1.12 PLIST --- pkg/PLIST 4 Sep 2018 12:46:16 -0000 1.12 +++ pkg/PLIST 13 May 2019 06:26:23 -0000 @@ -1,6 +1,7 @@ @comment $OpenBSD: PLIST,v 1.12 2018/09/04 12:46:16 espie Exp $ @newgroup _memcached:637 @newuser _memcached:637:_memcached:daemon:memcache daemon:/var/empty:/sbin/nologin +@rcscript ${RCDIR}/memcached @bin bin/memcached bin/memcached-tool include/memcached/ @@ -13,5 +14,5 @@ share/doc/memcached/protocol.txt share/doc/memcached/readme.txt share/doc/memcached/storage.txt share/doc/memcached/threads.txt +share/doc/memcached/tls.txt share/doc/pkg-readmes/${PKGSTEM} -@rcscript ${RCDIR}/memcached