Re: update misc/memcached to 1.5.14

2019-05-14 Thread Stuart Henderson
On 2019/05/13 21:13, Giovanni Bechis wrote:
> On Mon, May 13, 2019 at 12:24:29PM +0100, Stuart Henderson wrote:
> > On 2019/05/13 12:23, Stuart Henderson wrote:
> > > On 2019/05/13 09:02, Giovanni Bechis wrote:
> > > > 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  
> > > > > 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.
> > > 
> > > Maybe worth adding --enable-tls (and syncing WANTLIB)?
> > > 
> > > OK either way.
> > > 
> > 
> > Oh actually... hold for a little while, I want to make sure it still builds 
> > on arm64.
> > 
> I do not know if it's useful or not, there is a "--enable-arm-crc32 (ARMv8 
> CRC32 instructions)" 
> option as well in configure.
>  Giovanni
> 

Yep that is why I wanted to check, in case it autodetected it and triggered
breakage there. Confirmed it builds, so I am OK to go ahead (either with or
without --enable-tls).





Re: update misc/memcached to 1.5.14

2019-05-13 Thread Giovanni Bechis
On Mon, May 13, 2019 at 12:24:29PM +0100, Stuart Henderson wrote:
> On 2019/05/13 12:23, Stuart Henderson wrote:
> > On 2019/05/13 09:02, Giovanni Bechis wrote:
> > > 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  
> > > > 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.
> > 
> > Maybe worth adding --enable-tls (and syncing WANTLIB)?
> > 
> > OK either way.
> > 
> 
> Oh actually... hold for a little while, I want to make sure it still builds 
> on arm64.
> 
I do not know if it's useful or not, there is a "--enable-arm-crc32 (ARMv8 
CRC32 instructions)" 
option as well in configure.
 Giovanni



Re: update misc/memcached to 1.5.14

2019-05-13 Thread Stuart Henderson
On 2019/05/13 12:23, Stuart Henderson wrote:
> On 2019/05/13 09:02, Giovanni Bechis wrote:
> > 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  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.
> 
> Maybe worth adding --enable-tls (and syncing WANTLIB)?
> 
> OK either way.
> 

Oh actually... hold for a little while, I want to make sure it still builds on 
arm64.



Re: update misc/memcached to 1.5.14

2019-05-13 Thread Stuart Henderson
On 2019/05/13 09:02, Giovanni Bechis wrote:
> 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  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.

Maybe worth adding --enable-tls (and syncing WANTLIB)?

OK either way.



Re: update misc/memcached to 1.5.14

2019-05-13 Thread Giovanni Bechis
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



Re: update misc/memcached to 1.5.14

2019-05-13 Thread Giovanni Bechis
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  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 -	1.45
+++ Makefile	13 May 2019 06:26:23 -
@@ -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 -	1.27
+++ distinfo	13 May 2019 06:26:23 -
@@ -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 -	1.12
+++ patches/patch-configure	13 May 2019 06:57:11 -
@@ -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 -	1.16
+++ patches/patch-memcached_c	13 May 2019 06:57:58 -
@@ -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 -	1.12
+++ pkg/PLIST	13 May 2019 06:26:23 -
@@ -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


Re: update misc/memcached to 1.5.14

2019-05-13 Thread David CARLIER
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  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



update misc/memcached to 1.5.14

2019-05-12 Thread David CARLIER
Hi,

Here a proposal straight to 1.5.14, removing a patch due to
drop_privilege support feature.

Regards.


patch-misc-memcached.diff
Description: Binary data


Re: UPDATE: misc/memcached

2017-12-18 Thread Jeremie Courreges-Anglas
On Sun, Dec 17 2017, Giovanni Bechis  wrote:

[...]

> correct, what about that then ?

LGTM

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: UPDATE: misc/memcached

2017-12-17 Thread Giovanni Bechis
On Sun, Dec 17, 2017 at 01:24:30PM +0100, Jeremie Courreges-Anglas wrote:
> On Sun, Dec 17 2017, Giovanni Bechis  wrote:
> > Il 17 dicembre 2017 11:54:22 CET, Jeremie Courreges-Anglas 
> >  ha scritto:
> >>On Sat, Dec 16 2017, Giovanni Bechis  wrote:
> >>> On 12/15/17 17:51, Jeremie Courreges-Anglas wrote:
>  On Wed, Nov 22 2017, Giovanni Bechis  wrote:
> > Hi,
> > update to latest release, some bug fixes and pledge(2) support
> > committed upstream.
>  
>  I don't use this but the update looks fine ports-wise.  ok jca@ fwiw
>  
> > Pledge(2) support is enabled only if the daemon is not run with "-o
> >>no_drop_privileges" parameter;
> > do we want to go the way upstream goes or should we disable the
> >>possibility to disable pledge(2) ?
>  
>  I would not bother disabling this, but if you do make it obvious
> >>that
>  -o no_drop_privileges won't work.  If people use the option as
>  a workaround and slack off instead of reporting bugs, they're the
> >>ones
>  not benefiting from pledge(2), which is not a smart thing to do.
>  
> >>> what about this one ?
> >>
> >>I have a knee-jerk reaction whenever I see #ifdef SOME_OS, I would have
> >>implemented this as a configure-time option which would be usable on
> >>other systems that provide sandboxing.  Words are cheap and I don't
> >>care
> >>enough to write a diff, so please go ahead with whatever suits you. ;)
> >
> > As done in other diffs, I would like to go with a diff as simple as 
> > possible for our tree, then push a proper autoconf diff to upstream for 
> > next release.
> 
> Cool!  But then you could make your patch even shorter: no need to add
> the #ifdef __OpenBSD__ goo. :)
> 
correct, what about that then ?
 Cheers
  Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile31 Oct 2017 07:39:25 -  1.39
+++ Makefile15 Dec 2017 23:28:28 -
@@ -2,7 +2,7 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME=  memcached-1.5.2
+DISTNAME=  memcached-1.5.3
 CATEGORIES=misc
 
 HOMEPAGE=  https://www.memcached.org/
Index: distinfo
===
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.25
diff -u -p -r1.25 distinfo
--- distinfo31 Oct 2017 07:39:25 -  1.25
+++ distinfo15 Dec 2017 23:28:30 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.5.2.tar.gz) = mskxE7210DfnnGEnc4ZWSsLl4x1J5ZTxHlVOTBSbckU=
-SIZE (memcached-1.5.2.tar.gz) = 407715
+SHA256 (memcached-1.5.3.tar.gz) = JYzD3bdhNoVGWs/QIV+CciCju90Wf9LAgGMhBbLS884=
+SIZE (memcached-1.5.3.tar.gz) = 409131
Index: patches/patch-configure
===
RCS file: /var/cvs/ports/misc/memcached/patches/patch-configure,v
retrieving revision 1.10
diff -u -p -r1.10 patch-configure
--- patches/patch-configure 31 Oct 2017 07:39:25 -  1.10
+++ patches/patch-configure 15 Dec 2017 23:30:49 -
@@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.10 2017/10
 Index: configure
 --- configure.orig
 +++ configure
-@@ -6517,7 +6517,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+@@ -6551,7 +6551,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.14
diff -u -p -r1.14 patch-memcached_c
--- patches/patch-memcached_c   31 Oct 2017 07:39:25 -  1.14
+++ patches/patch-memcached_c   17 Dec 2017 19:31:41 -
@@ -1,31 +1,15 @@
-$OpenBSD: patch-memcached_c,v 1.14 2017/10/31 07:39:25 giovanni Exp $
+$OpenBSD$
+
 Index: memcached.c
 --- memcached.c.orig
 +++ memcached.c
-@@ -23,6 +23,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- /* some POSIX systems need the following definition
-  * to get mlockall flags out of sys/mman.h.  */
-@@ -6861,6 +6862,18 @@ int main (int argc, char **argv) {
- 
- if (pid_file != NULL) {
- save_pid(pid_file);
-+}
-+
-+if (settings.socketpath != NULL) {
-+   if (pledge("stdio unix", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
+@@ -6927,6 +6927,9 @@ int main (int argc, char **argv) {
+ /* Drop privileges no longer needed */
+ if (settings.drop_privileges) {
+ drop_privileges();
 +} else {
-+   if (pledge("stdio inet", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
++fprintf(stderr, "no_drop_privileges 

Re: UPDATE: misc/memcached

2017-12-17 Thread Jeremie Courreges-Anglas
On Sun, Dec 17 2017, Giovanni Bechis  wrote:
> Il 17 dicembre 2017 11:54:22 CET, Jeremie Courreges-Anglas  
> ha scritto:
>>On Sat, Dec 16 2017, Giovanni Bechis  wrote:
>>> On 12/15/17 17:51, Jeremie Courreges-Anglas wrote:
 On Wed, Nov 22 2017, Giovanni Bechis  wrote:
> Hi,
> update to latest release, some bug fixes and pledge(2) support
> committed upstream.
 
 I don't use this but the update looks fine ports-wise.  ok jca@ fwiw
 
> Pledge(2) support is enabled only if the daemon is not run with "-o
>>no_drop_privileges" parameter;
> do we want to go the way upstream goes or should we disable the
>>possibility to disable pledge(2) ?
 
 I would not bother disabling this, but if you do make it obvious
>>that
 -o no_drop_privileges won't work.  If people use the option as
 a workaround and slack off instead of reporting bugs, they're the
>>ones
 not benefiting from pledge(2), which is not a smart thing to do.
 
>>> what about this one ?
>>
>>I have a knee-jerk reaction whenever I see #ifdef SOME_OS, I would have
>>implemented this as a configure-time option which would be usable on
>>other systems that provide sandboxing.  Words are cheap and I don't
>>care
>>enough to write a diff, so please go ahead with whatever suits you. ;)
>
> As done in other diffs, I would like to go with a diff as simple as possible 
> for our tree, then push a proper autoconf diff to upstream for next release.

Cool!  But then you could make your patch even shorter: no need to add
the #ifdef __OpenBSD__ goo. :)

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE


signature.asc
Description: PGP signature


Re: UPDATE: misc/memcached

2017-12-17 Thread Giovanni Bechis
Il 17 dicembre 2017 11:54:22 CET, Jeremie Courreges-Anglas  ha 
scritto:
>On Sat, Dec 16 2017, Giovanni Bechis  wrote:
>> On 12/15/17 17:51, Jeremie Courreges-Anglas wrote:
>>> On Wed, Nov 22 2017, Giovanni Bechis  wrote:
 Hi,
 update to latest release, some bug fixes and pledge(2) support
 committed upstream.
>>> 
>>> I don't use this but the update looks fine ports-wise.  ok jca@ fwiw
>>> 
 Pledge(2) support is enabled only if the daemon is not run with "-o
>no_drop_privileges" parameter;
 do we want to go the way upstream goes or should we disable the
>possibility to disable pledge(2) ?
>>> 
>>> I would not bother disabling this, but if you do make it obvious
>that
>>> -o no_drop_privileges won't work.  If people use the option as
>>> a workaround and slack off instead of reporting bugs, they're the
>ones
>>> not benefiting from pledge(2), which is not a smart thing to do.
>>> 
>> what about this one ?
>
>I have a knee-jerk reaction whenever I see #ifdef SOME_OS, I would have
>implemented this as a configure-time option which would be usable on
>other systems that provide sandboxing.  Words are cheap and I don't
>care
>enough to write a diff, so please go ahead with whatever suits you. ;)

As done in other diffs, I would like to go with a diff as simple as possible 
for our tree, then push a proper autoconf diff to upstream for next release.
  Giovanni



Re: UPDATE: misc/memcached

2017-12-17 Thread Jeremie Courreges-Anglas
On Sat, Dec 16 2017, Giovanni Bechis  wrote:
> On 12/15/17 17:51, Jeremie Courreges-Anglas wrote:
>> On Wed, Nov 22 2017, Giovanni Bechis  wrote:
>>> Hi,
>>> update to latest release, some bug fixes and pledge(2) support
>>> committed upstream.
>> 
>> I don't use this but the update looks fine ports-wise.  ok jca@ fwiw
>> 
>>> Pledge(2) support is enabled only if the daemon is not run with "-o 
>>> no_drop_privileges" parameter;
>>> do we want to go the way upstream goes or should we disable the possibility 
>>> to disable pledge(2) ?
>> 
>> I would not bother disabling this, but if you do make it obvious that
>> -o no_drop_privileges won't work.  If people use the option as
>> a workaround and slack off instead of reporting bugs, they're the ones
>> not benefiting from pledge(2), which is not a smart thing to do.
>> 
> what about this one ?

I have a knee-jerk reaction whenever I see #ifdef SOME_OS, I would have
implemented this as a configure-time option which would be usable on
other systems that provide sandboxing.  Words are cheap and I don't care
enough to write a diff, so please go ahead with whatever suits you. ;)

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: UPDATE: misc/memcached

2017-12-15 Thread Giovanni Bechis
On 12/15/17 17:51, Jeremie Courreges-Anglas wrote:
> On Wed, Nov 22 2017, Giovanni Bechis  wrote:
>> Hi,
>> update to latest release, some bug fixes and pledge(2) support
>> committed upstream.
> 
> I don't use this but the update looks fine ports-wise.  ok jca@ fwiw
> 
>> Pledge(2) support is enabled only if the daemon is not run with "-o 
>> no_drop_privileges" parameter;
>> do we want to go the way upstream goes or should we disable the possibility 
>> to disable pledge(2) ?
> 
> I would not bother disabling this, but if you do make it obvious that
> -o no_drop_privileges won't work.  If people use the option as
> a workaround and slack off instead of reporting bugs, they're the ones
> not benefiting from pledge(2), which is not a smart thing to do.
> 
what about this one ?
 Cheers & Thanks
  Giovanni

> My two cents,
> 

Index: Makefile
===
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile	31 Oct 2017 07:39:25 -	1.39
+++ Makefile	15 Dec 2017 23:28:28 -
@@ -2,7 +2,7 @@
 
 COMMENT=	distributed memory object caching system
 
-DISTNAME=	memcached-1.5.2
+DISTNAME=	memcached-1.5.3
 CATEGORIES=	misc
 
 HOMEPAGE=	https://www.memcached.org/
Index: distinfo
===
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.25
diff -u -p -r1.25 distinfo
--- distinfo	31 Oct 2017 07:39:25 -	1.25
+++ distinfo	15 Dec 2017 23:28:30 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.5.2.tar.gz) = mskxE7210DfnnGEnc4ZWSsLl4x1J5ZTxHlVOTBSbckU=
-SIZE (memcached-1.5.2.tar.gz) = 407715
+SHA256 (memcached-1.5.3.tar.gz) = JYzD3bdhNoVGWs/QIV+CciCju90Wf9LAgGMhBbLS884=
+SIZE (memcached-1.5.3.tar.gz) = 409131
Index: patches/patch-configure
===
RCS file: /var/cvs/ports/misc/memcached/patches/patch-configure,v
retrieving revision 1.10
diff -u -p -r1.10 patch-configure
--- patches/patch-configure	31 Oct 2017 07:39:25 -	1.10
+++ patches/patch-configure	15 Dec 2017 23:30:49 -
@@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.10 2017/10
 Index: configure
 --- configure.orig
 +++ configure
-@@ -6517,7 +6517,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+@@ -6551,7 +6551,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.14
diff -u -p -r1.14 patch-memcached_c
--- patches/patch-memcached_c	31 Oct 2017 07:39:25 -	1.14
+++ patches/patch-memcached_c	15 Dec 2017 23:30:43 -
@@ -1,31 +1,17 @@
-$OpenBSD: patch-memcached_c,v 1.14 2017/10/31 07:39:25 giovanni Exp $
+$OpenBSD$
+
 Index: memcached.c
 --- memcached.c.orig
 +++ memcached.c
-@@ -23,6 +23,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- /* some POSIX systems need the following definition
-  * to get mlockall flags out of sys/mman.h.  */
-@@ -6861,6 +6862,18 @@ int main (int argc, char **argv) {
- 
- if (pid_file != NULL) {
- save_pid(pid_file);
-+}
-+
-+if (settings.socketpath != NULL) {
-+   if (pledge("stdio unix", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
+@@ -6927,6 +6927,11 @@ int main (int argc, char **argv) {
+ /* Drop privileges no longer needed */
+ if (settings.drop_privileges) {
+ drop_privileges();
 +} else {
-+   if (pledge("stdio inet", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
++#ifdef __OpenBSD__
++fprintf(stderr, "no_drop_privileges option unsupported on this operating system.\n");
++exit(EXIT_FAILURE);
++#endif
  }
  
- /* Drop privileges no longer needed */
+ /* Initialize the uriencode lookup table. */


Re: UPDATE: misc/memcached

2017-12-15 Thread Jeremie Courreges-Anglas
On Wed, Nov 22 2017, Giovanni Bechis  wrote:
> Hi,
> update to latest release, some bug fixes and pledge(2) support
> committed upstream.

I don't use this but the update looks fine ports-wise.  ok jca@ fwiw

> Pledge(2) support is enabled only if the daemon is not run with "-o 
> no_drop_privileges" parameter;
> do we want to go the way upstream goes or should we disable the possibility 
> to disable pledge(2) ?

I would not bother disabling this, but if you do make it obvious that
-o no_drop_privileges won't work.  If people use the option as
a workaround and slack off instead of reporting bugs, they're the ones
not benefiting from pledge(2), which is not a smart thing to do.

My two cents,
-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



UPDATE: misc/memcached

2017-11-22 Thread Giovanni Bechis
Hi,
update to latest release, some bug fixes and pledge(2) support committed 
upstream.
Pledge(2) support is enabled only if the daemon is not run with "-o 
no_drop_privileges" parameter;
do we want to go the way upstream goes or should we disable the possibility to 
disable pledge(2) ?
 Cheers
  Giovanni
Index: Makefile
===
RCS file: /cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile	31 Oct 2017 07:39:25 -	1.39
+++ Makefile	22 Nov 2017 16:58:51 -
@@ -2,7 +2,7 @@
 
 COMMENT=	distributed memory object caching system
 
-DISTNAME=	memcached-1.5.2
+DISTNAME=	memcached-1.5.3
 CATEGORIES=	misc
 
 HOMEPAGE=	https://www.memcached.org/
Index: distinfo
===
RCS file: /cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.25
diff -u -p -r1.25 distinfo
--- distinfo	31 Oct 2017 07:39:25 -	1.25
+++ distinfo	22 Nov 2017 16:58:51 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.5.2.tar.gz) = mskxE7210DfnnGEnc4ZWSsLl4x1J5ZTxHlVOTBSbckU=
-SIZE (memcached-1.5.2.tar.gz) = 407715
+SHA256 (memcached-1.5.3.tar.gz) = JYzD3bdhNoVGWs/QIV+CciCju90Wf9LAgGMhBbLS884=
+SIZE (memcached-1.5.3.tar.gz) = 409131
Index: patches/patch-memcached_c
===
RCS file: patches/patch-memcached_c
diff -N patches/patch-memcached_c
--- patches/patch-memcached_c	31 Oct 2017 07:39:25 -	1.14
+++ /dev/null	1 Jan 1970 00:00:00 -
@@ -1,31 +0,0 @@
-$OpenBSD: patch-memcached_c,v 1.14 2017/10/31 07:39:25 giovanni Exp $
-Index: memcached.c
 memcached.c.orig
-+++ memcached.c
-@@ -23,6 +23,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- /* some POSIX systems need the following definition
-  * to get mlockall flags out of sys/mman.h.  */
-@@ -6861,6 +6862,18 @@ int main (int argc, char **argv) {
- 
- if (pid_file != NULL) {
- save_pid(pid_file);
-+}
-+
-+if (settings.socketpath != NULL) {
-+   if (pledge("stdio unix", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
-+} else {
-+   if (pledge("stdio inet", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
- }
- 
- /* Drop privileges no longer needed */


UPDATE: misc/memcached

2017-10-23 Thread Giovanni Bechis
Update to latest major version and simplify pledge(1) patch a bit.
 Comments ? Ok ?
  Cheers
   Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.38
diff -u -p -r1.38 Makefile
--- Makefile17 Jul 2017 08:35:08 -  1.38
+++ Makefile19 Oct 2017 06:33:27 -
@@ -2,7 +2,7 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME=  memcached-1.4.39
+DISTNAME=  memcached-1.5.2
 CATEGORIES=misc
 
 HOMEPAGE=  http://www.memcached.org/
Index: distinfo
===
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.24
diff -u -p -r1.24 distinfo
--- distinfo17 Jul 2017 08:35:08 -  1.24
+++ distinfo19 Oct 2017 06:33:33 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.4.39.tar.gz) = I8S/fHh+T9mnsKe2Gz/8s3TuhvnMALqJLOU+7ECv1zU=
-SIZE (memcached-1.4.39.tar.gz) = 403751
+SHA256 (memcached-1.5.2.tar.gz) = mskxE7210DfnnGEnc4ZWSsLl4x1J5ZTxHlVOTBSbckU=
+SIZE (memcached-1.5.2.tar.gz) = 407715
Index: patches/patch-configure
===
RCS file: /var/cvs/ports/misc/memcached/patches/patch-configure,v
retrieving revision 1.9
diff -u -p -r1.9 patch-configure
--- patches/patch-configure 20 Jun 2017 19:52:26 -  1.9
+++ patches/patch-configure 30 Aug 2017 15:33:33 -
@@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.9 2017/06/
 Index: configure
 --- configure.orig
 +++ configure
-@@ -6432,7 +6432,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+@@ -6517,7 +6517,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.13
diff -u -p -r1.13 patch-memcached_c
--- patches/patch-memcached_c   17 Jul 2017 08:35:08 -  1.13
+++ patches/patch-memcached_c   30 Aug 2017 15:33:24 -
@@ -10,36 +10,22 @@ Index: memcached.c
  
  /* some POSIX systems need the following definition
   * to get mlockall flags out of sys/mman.h.  */
-@@ -6733,6 +6734,32 @@ int main (int argc, char **argv) {
+@@ -6861,6 +6862,18 @@ int main (int argc, char **argv) {
  
  if (pid_file != NULL) {
  save_pid(pid_file);
 +}
 +
 +if (settings.socketpath != NULL) {
-+if (pid_file != NULL) {
-+   if (pledge("stdio cpath unix", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
-+} else {
 +   if (pledge("stdio unix", NULL) == -1) {
 +  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
 +  exit(1);
 +   }
-+}
 +} else {
-+if (pid_file != NULL) {
-+   if (pledge("stdio cpath inet", NULL) == -1) {
-+  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+  exit(1);
-+   }
-+} else {
 +   if (pledge("stdio inet", NULL) == -1) {
 +  fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
 +  exit(1);
 +   }
-+}
  }
  
  /* Drop privileges no longer needed */


signature.asc
Description: PGP signature


UPDATE: misc/memcached

2017-04-04 Thread Giovanni Bechis
Important bugfix update to 1.4.36.
 Comments ? Ok ?
  Cheers
   Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- Makefile14 Nov 2016 17:44:49 -  1.34
+++ Makefile4 Apr 2017 22:13:19 -
@@ -2,7 +2,7 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME=  memcached-1.4.33
+DISTNAME=  memcached-1.4.36
 CATEGORIES=misc
 
 HOMEPAGE=  http://www.memcached.org/
Index: distinfo
===
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.20
diff -u -p -r1.20 distinfo
--- distinfo14 Nov 2016 17:44:49 -  1.20
+++ distinfo4 Apr 2017 22:13:26 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.4.33.tar.gz) = g3JsjWgljFZxI3MHKrslpEnCVzmAdaOewIZ/2Lppdx0=
-SIZE (memcached-1.4.33.tar.gz) = 389813
+SHA256 (memcached-1.4.36.tar.gz) = dztrsgv4AiPKahXXX1cPurNGrRHsmFleWvXjP1S9gtg=
+SIZE (memcached-1.4.36.tar.gz) = 399047


signature.asc
Description: PGP signature


UPDATE: misc/memcached

2016-03-04 Thread Giovanni Bechis
Update to 1.4.25 and add a tool to monitor the memcached server.
Comments ? Ok ?
 Cheers
  Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile5 May 2015 15:43:03 -   1.29
+++ Makefile30 Dec 2015 12:15:49 -
@@ -2,7 +2,7 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME=  memcached-1.4.24
+DISTNAME=  memcached-1.4.25
 CATEGORIES=misc
 
 HOMEPAGE=  http://www.memcached.org/
@@ -39,5 +39,6 @@ CONFIGURE_ARGS+=  --disable-sasl
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/memcached
${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/memcached
+   ${INSTALL_SCRIPT} ${WRKSRC}/scripts/memcached-tool 
${PREFIX}/bin/memcached-tool
 
 .include 
Index: distinfo
===
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.16
diff -u -p -r1.16 distinfo
--- distinfo5 May 2015 15:43:03 -   1.16
+++ distinfo30 Dec 2015 12:13:56 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.4.24.tar.gz) = CKQmxQTs9kYzFR7sEFhYR1TS9U5i5e0taAhVlAFhflU=
-SIZE (memcached-1.4.24.tar.gz) = 354917
+SHA256 (memcached-1.4.25.tar.gz) = 8FhDezwiTTIZGammu04+7bIxLtcYwMrwh/8vBKt5Xdo=
+SIZE (memcached-1.4.25.tar.gz) = 359709
Index: pkg/PLIST
===
RCS file: /var/cvs/ports/misc/memcached/pkg/PLIST,v
retrieving revision 1.9
diff -u -p -r1.9 PLIST
--- pkg/PLIST   5 May 2015 15:43:03 -   1.9
+++ pkg/PLIST   4 Mar 2016 22:26:58 -
@@ -2,6 +2,7 @@
 @newgroup _memcached:637
 @newuser _memcached:637:_memcached:daemon:memcache 
daemon:/var/empty:/sbin/nologin
 @bin bin/memcached
+bin/memcached-tool
 include/memcached/
 include/memcached/protocol_binary.h
 @man man/man1/memcached.1


UPDATE: misc/memcached

2014-07-13 Thread Giovanni Bechis
Update to 1.4.20, ~2 years of development,
Changelog available at https://code.google.com/p/memcached/wiki/ReleaseNotes
Comments ? Ok ?
 Cheers
  Giovanni
Index: Makefile
===
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- Makefile5 Jan 2014 13:32:43 -   1.24
+++ Makefile13 Jul 2014 22:09:54 -
@@ -2,8 +2,7 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME=  memcached-1.4.14
-REVISION=  1
+DISTNAME=  memcached-1.4.20
 CATEGORIES=misc
 
 HOMEPAGE=  http://www.memcached.org/
@@ -13,8 +12,7 @@ PERMIT_PACKAGE_CDROM= Yes
 
 WANTLIB=   c event pthread
 
-MASTER_SITES=  https://memcached.googlecode.com/files/
-MASTER_SITES0= ${HOMEPAGE}/dist/
+MASTER_SITES=  http://memcached.org/files/
 
 CONFIGURE_STYLE=   gnu
 CONFIGURE_ARGS=--with-libevent=/usr \
Index: distinfo
===
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo29 Nov 2012 22:10:01 -  1.13
+++ distinfo13 Jul 2014 22:09:57 -
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.4.14.tar.gz) = 8uKtjujSVvLDdI1/dB3N39Cra97Ob6HBhIToPzERVu8=
-SIZE (memcached-1.4.14.tar.gz) = 321262
+SHA256 (memcached-1.4.20.tar.gz) = JdEhQI7tCxUiMI/zUggZsTDwS6BVTGimc68jqRWlQBg=
+SIZE (memcached-1.4.20.tar.gz) = 337380
Index: patches/patch-configure
===
RCS file: /var/cvs/ports/misc/memcached/patches/patch-configure,v
retrieving revision 1.4
diff -u -p -r1.4 patch-configure
--- patches/patch-configure 23 Aug 2012 17:51:22 -  1.4
+++ patches/patch-configure 13 Jul 2014 22:13:24 -
@@ -1,7 +1,7 @@
 $OpenBSD: patch-configure,v 1.4 2012/08/23 17:51:22 ajacoutot Exp $
 configure.orig Thu Feb  2 21:24:20 2012
-+++ configure  Fri Mar 30 21:27:25 2012
-@@ -6261,7 +6261,7 @@ $as_echo #define _GNU_SOURCE 1 confdefs.h
+--- configure.orig Sun May 11 09:38:24 2014
 configure  Mon Jul 14 00:10:07 2014
+@@ -6368,7 +6368,7 @@ $as_echo #define _GNU_SOURCE 1 confdefs.h
  elif test $GCC = yes
  then
GCC_VERSION=`$CC -dumpversion`
Index: patches/patch-items_c
===
RCS file: /var/cvs/ports/misc/memcached/patches/patch-items_c,v
retrieving revision 1.6
diff -u -p -r1.6 patch-items_c
--- patches/patch-items_c   5 Jan 2014 13:32:43 -   1.6
+++ patches/patch-items_c   13 Jul 2014 22:13:24 -
@@ -5,9 +5,9 @@ printf format string fix for long long t
 and fix buffer-overrun when logging keys (CVE-2013-0179)
 
https://github.com/memcached/memcached/commit/fbe823d9a61b5149cd6e3b5e17bd28dd3b8dd760
 
 items.c.orig   Mon Jul 30 22:23:37 2012
-+++ items.cThu Jan  2 17:02:16 2014
-@@ -389,9 +389,9 @@ char *do_item_cachedump(const unsigned int slabs_clsid
+--- items.c.orig   Fri May  2 00:10:56 2014
 items.cMon Jul 14 00:10:07 2014
+@@ -410,9 +410,9 @@ char *do_item_cachedump(const unsigned int slabs_clsid
  /* Copy the key since it may not be null-terminated in the struct */
  strncpy(key_temp, ITEM_key(it), it-nkey);
  key_temp[it-nkey] = 0x00; /* terminate */
@@ -19,23 +19,3 @@ https://github.com/memcached/memcached/c
  if (bufcurr + len + 6  memlimit)  /* 6 is END\r\n\0 */
  break;
  memcpy(buffer + bufcurr, temp, len);
-@@ -510,9 +510,17 @@ item *do_item_get(const char *key, const size_t nkey, 
- 
- if (settings.verbose  2) {
- if (it == NULL) {
--fprintf(stderr,  NOT FOUND %s, key);
-+int ii;
-+fprintf(stderr,  NOT FOUND );
-+for (ii = 0; ii  nkey; ++ii) {
-+fprintf(stderr, %c, key[ii]);
-+}
- } else {
--fprintf(stderr,  FOUND KEY %s, ITEM_key(it));
-+int ii;
-+fprintf(stderr,  FOUND KEY );
-+for (ii = 0; ii  it-nkey; ++ii) {
-+fprintf(stderr, %c, ITEM_key(it)[ii]);
-+}
- was_found++;
- }
- }
Index: patches/patch-memcached_c
===
RCS file: patches/patch-memcached_c
diff -N patches/patch-memcached_c
--- patches/patch-memcached_c   5 Jan 2014 13:32:43 -   1.8
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,41 +0,0 @@
-$OpenBSD: patch-memcached_c,v 1.8 2014/01/05 13:32:43 jasper Exp $
-
-buffer-overrun when logging keys (CVE-2013-0179)
-https://github.com/memcached/memcached/commit/fbe823d9a61b5149cd6e3b5e17bd28dd3b8dd760
-
-and fix segfault on specially crafted packet (CVE-2011-4971)
-https://github.com/memcached/memcached/commit/6695ccbc525c36d693aaa3e8337b36aa0c784424
-
 memcached.c.orig   Mon Jul 30 22:26:47 2012
-+++ 

[SECURITY UPDATE] misc/memcached (STABLE)

2014-01-02 Thread Donovan Watteau
Hi,

The following diff fixes CVE-2011-4971 and CVE-2013-0179 for 5.4-STABLE.
They are respectively fixed in Memcached 1.4.16 and 1.4.17 upstream, but
I'm avoiding the update here because I'm targeting -STABLE, and 1.4.15
made things more experimental so 1.4.17 might not be ready yet.

These fixes come from Debian Wheezy, which applied them for
Memcached 1.4.13.  Debian also has a patch for CVE-2013-7239, but this
is for SASL which isn't enabled here.

Some links from upstream:
https://code.google.com/p/memcached/issues/detail?id=192
https://code.google.com/p/memcached/issues/detail?id=306

The diff probably applies cleanly for -current as well (MASTER_SITES was
the only change AFAICS).

Index: Makefile
===
RCS file: /cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile25 Apr 2013 21:33:21 -  1.22
+++ Makefile2 Jan 2014 16:14:48 -
@@ -2,8 +2,8 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME = memcached-1.4.14
-REVISION = 0
+DISTNAME=  memcached-1.4.14
+REVISION=  1
 CATEGORIES=misc
 
 HOMEPAGE=  http://www.memcached.org/
Index: patches/patch-items_c
===
RCS file: /cvs/ports/misc/memcached/patches/patch-items_c,v
retrieving revision 1.5
diff -u -p -r1.5 patch-items_c
--- patches/patch-items_c   25 Apr 2013 21:33:21 -  1.5
+++ patches/patch-items_c   2 Jan 2014 16:14:48 -
@@ -1,6 +1,11 @@
 $OpenBSD: patch-items_c,v 1.5 2013/04/25 21:33:21 sthen Exp $
 items.c.orig   Thu Apr 25 22:31:03 2013
-+++ items.cThu Apr 25 22:31:47 2013
+
+printf format string fix for long long time_t
+
+and fix buffer-overrun when logging keys (CVE-2013-0179)
+
+--- items.c.orig   Mon Jul 30 22:23:37 2012
 items.cThu Jan  2 17:02:16 2014
 @@ -389,9 +389,9 @@ char *do_item_cachedump(const unsigned int slabs_clsid
  /* Copy the key since it may not be null-terminated in the struct */
  strncpy(key_temp, ITEM_key(it), it-nkey);
@@ -13,3 +18,23 @@ $OpenBSD: patch-items_c,v 1.5 2013/04/25
  if (bufcurr + len + 6  memlimit)  /* 6 is END\r\n\0 */
  break;
  memcpy(buffer + bufcurr, temp, len);
+@@ -510,9 +510,17 @@ item *do_item_get(const char *key, const size_t nkey, 
+ 
+ if (settings.verbose  2) {
+ if (it == NULL) {
+-fprintf(stderr,  NOT FOUND %s, key);
++int ii;
++fprintf(stderr,  NOT FOUND );
++for (ii = 0; ii  nkey; ++ii) {
++fprintf(stderr, %c, key[ii]);
++}
+ } else {
+-fprintf(stderr,  FOUND KEY %s, ITEM_key(it));
++int ii;
++fprintf(stderr,  FOUND KEY );
++for (ii = 0; ii  it-nkey; ++ii) {
++fprintf(stderr, %c, ITEM_key(it)[ii]);
++}
+ was_found++;
+ }
+ }
Index: patches/patch-memcached_c
===
RCS file: patches/patch-memcached_c
diff -N patches/patch-memcached_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-memcached_c   2 Jan 2014 16:14:48 -
@@ -0,0 +1,39 @@
+$OpenBSD$
+
+buffer-overrun when logging keys (CVE-2013-0179)
+
+and fix segfault on specially crafted packet (CVE-2011-4971)
+
+--- memcached.c.orig   Mon Jul 30 22:26:47 2012
 memcached.cThu Jan  2 16:59:32 2014
+@@ -2149,7 +2149,12 @@ static void process_bin_delete(conn *c) {
+ assert(c != NULL);
+ 
+ if (settings.verbose  1) {
+-fprintf(stderr, Deleting %s\n, key);
++int ii;
++fprintf(stderr, Deleting );
++for (ii = 0; ii  nkey; ++ii) {
++fprintf(stderr, %c, key[ii]);
++}
++fprintf(stderr, \n);
+ }
+ 
+ if (settings.detail_enabled) {
+@@ -3863,6 +3868,16 @@ static void drive_machine(conn *c) {
+ complete_nread(c);
+ break;
+ }
++
++/* Check if rbytes  0, to prevent crash */
++if (c-rlbytes  0) {
++if (settings.verbose) {
++fprintf(stderr, Invalid rlbytes to read: len %d\n, 
c-rlbytes);
++}
++conn_set_state(c, conn_closing);
++break;
++}
++
+ /* first check if we have leftovers in the conn_read buffer */
+ if (c-rbytes  0) {
+ int tocopy = c-rbytes  c-rlbytes ? c-rlbytes : c-rbytes;
Index: patches/patch-t_issue_192_t
===
RCS file: patches/patch-t_issue_192_t
diff -N patches/patch-t_issue_192_t
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-t_issue_192_t 2 Jan 2014 16:14:48 -
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+Test case for CVE-2011-4971
+
+--- t/issue_192.t.orig Thu Jan  2 16:48:36 2014
 

Re: UPDATE misc/memcached

2011-12-25 Thread Stefan Sperling
On Thu, Dec 22, 2011 at 07:06:14PM +0100, Sebastian Reitenbach wrote:
 Maintainer timed out. I'd like to get this in. This time its inlined, the 
 only change is that I moved the -d parameter to daemon, instead of the 
 daemon_flags, similar to other changes done to other ports so that it always 
 daemonizes.
 
 is it OK?

OK for me.

Slightly tested with devel/subversion on amd64. It seems to run fine:

stats
STAT pid 12951
STAT uptime 1314
STAT time 1324808489
STAT version 1.4.10
STAT libevent 1.4.14b-stable
STAT pointer_size 64
STAT rusage_user 0.11
STAT rusage_system 0.36
STAT curr_connections 10
STAT total_connections 750
STAT connection_structures 13
STAT reserved_fds 20
STAT cmd_get 8112
STAT cmd_set 5508
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 2604
STAT get_misses 5508
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 1485917
STAT bytes_written 497951
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT bytes 861008
STAT curr_items 4409
STAT total_items 5508
STAT evictions 0
STAT reclaimed 0

 ? memcached-1.4.10.diff
 Index: Makefile
 ===
 RCS file: /cvs/ports/misc/memcached/Makefile,v
 retrieving revision 1.15
 diff -u -r1.15 Makefile
 --- Makefile  11 Jul 2011 12:13:03 -  1.15
 +++ Makefile  14 Nov 2011 09:33:08 -
 @@ -2,8 +2,7 @@
  
  COMMENT= distributed memory object caching system
  
 -DISTNAME=memcached-1.4.5
 -REVISION=0
 +DISTNAME =   memcached-1.4.10
  CATEGORIES=  misc
  
  HOMEPAGE=http://www.danga.com/memcached/
 Index: distinfo
 ===
 RCS file: /cvs/ports/misc/memcached/distinfo,v
 retrieving revision 1.10
 diff -u -r1.10 distinfo
 --- distinfo  14 Oct 2010 12:33:03 -  1.10
 +++ distinfo  14 Nov 2011 09:33:08 -
 @@ -1,5 +1,5 @@
 -MD5 (memcached-1.4.5.tar.gz) = WDRBol+Tc2BiQCTyiB5eqA==
 -RMD160 (memcached-1.4.5.tar.gz) = wfU0+8WFoeoDO70S1vyUx3oIUDI=
 -SHA1 (memcached-1.4.5.tar.gz) = x9ZRd2S4LSOuLedrVsJJQ0PFPwI=
 -SHA256 (memcached-1.4.5.tar.gz) = 
 lXG0uFSE5Gs7EPB8y6d6H6l9YGYLMoWfmQ7/77MAX5E=
 -SIZE (memcached-1.4.5.tar.gz) = 302516
 +MD5 (memcached-1.4.10.tar.gz) = jhgFTsXt/Zb33ofwJiIFKg==
 +RMD160 (memcached-1.4.10.tar.gz) = Z/Rne6ZEsbFRUaaGWoN3lm/hlwY=
 +SHA1 (memcached-1.4.10.tar.gz) = CuMA+Fi3Z6v4EgCdU+1YZHzrSYo=
 +SHA256 (memcached-1.4.10.tar.gz) = 
 LMPeNBtWFGTaKfxdXipPrMD2qvwVHw4dlCKHBeB1j98=
 +SIZE (memcached-1.4.10.tar.gz) = 311926
 Index: pkg/MESSAGE
 ===
 RCS file: /cvs/ports/misc/memcached/pkg/MESSAGE,v
 retrieving revision 1.1
 diff -u -r1.1 MESSAGE
 --- pkg/MESSAGE   7 Aug 2009 10:46:41 -   1.1
 +++ pkg/MESSAGE   14 Nov 2011 09:33:08 -
 @@ -1,13 +1,3 @@
 -To start memcached at boot time, add the following to /etc/rc.local:
 -
 -if [ -x ${PREFIX}/bin/memcached ]; then
 -echo -n ' memcached'
 -${PREFIX}/bin/memcached -d \
 -   -u _memcached -P /var/run/memcached.pid
 -fi
 -
 -To see further configuration options, run memcached -h.
 -
  Since memcached has no authentication mechanisms, it is designed for
  internal use only, and should be firewalled accordingly. You may wish
  to add a rule such as the following to /etc/pf.conf:
 Index: pkg/PLIST
 ===
 RCS file: /cvs/ports/misc/memcached/pkg/PLIST,v
 retrieving revision 1.5
 diff -u -r1.5 PLIST
 --- pkg/PLIST 21 Apr 2010 12:23:37 -  1.5
 +++ pkg/PLIST 14 Nov 2011 09:33:08 -
 @@ -8,4 +8,4 @@
  share/doc/memcached/
  share/doc/memcached/protocol.txt
  share/doc/memcached/readme.txt
 -share/doc/memcached/threads.txt
 +@rcscript ${RCDIR}/memcached
 Index: pkg/memcached.rc
 ===
 RCS file: pkg/memcached.rc
 diff -N pkg/memcached.rc
 --- /dev/null 1 Jan 1970 00:00:00 -
 +++ pkg/memcached.rc  14 Nov 2011 09:33:08 -
 @@ -0,0 +1,12 @@
 +#!/bin/sh
 +#
 +# $OpenBSD$
 +
 +daemon=${TRUEPREFIX}/bin/memcached -d
 +daemon_flags=-u _memcached -P /var/run/memcached.pid
 +
 +. /etc/rc.d/rc.subr
 +
 +rc_reload=NO
 +
 +rc_cmd $1



Re: UPDATE misc/memcached

2011-12-22 Thread Sebastian Reitenbach
 
On Thursday, December 15, 2011 11:54 CET, Sebastian Reitenbach 
sebas...@l00-bugdead-prods.de wrote: 
 
  
 On Tuesday, November 22, 2011 00:09 CET, Sebastian Reitenbach 
 sebas...@l00-bugdead-prods.de wrote: 
  
   
  On Monday, November 14, 2011 11:14 CET, Sebastian Reitenbach 
  sebas...@l00-bugdead-prods.de wrote: 
   
   Hi,
   
   updated memcached to 1.4.10, and added a rc script, which was long 
   overdue ;)
   
   Tested with www/sogo, and updated libmemcached which will come in next 
   mail. It seems to still work well with the new version.
   
   is it OK?
   
   Sebastian 

Maintainer timed out. I'd like to get this in. This time its inlined, the only 
change is that I moved the -d parameter to daemon, instead of the daemon_flags, 
similar to other changes done to other ports so that it always daemonizes.

is it OK?

? memcached-1.4.10.diff
Index: Makefile
===
RCS file: /cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile11 Jul 2011 12:13:03 -  1.15
+++ Makefile14 Nov 2011 09:33:08 -
@@ -2,8 +2,7 @@
 
 COMMENT=   distributed memory object caching system
 
-DISTNAME=  memcached-1.4.5
-REVISION=  0
+DISTNAME = memcached-1.4.10
 CATEGORIES=misc
 
 HOMEPAGE=  http://www.danga.com/memcached/
Index: distinfo
===
RCS file: /cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo14 Oct 2010 12:33:03 -  1.10
+++ distinfo14 Nov 2011 09:33:08 -
@@ -1,5 +1,5 @@
-MD5 (memcached-1.4.5.tar.gz) = WDRBol+Tc2BiQCTyiB5eqA==
-RMD160 (memcached-1.4.5.tar.gz) = wfU0+8WFoeoDO70S1vyUx3oIUDI=
-SHA1 (memcached-1.4.5.tar.gz) = x9ZRd2S4LSOuLedrVsJJQ0PFPwI=
-SHA256 (memcached-1.4.5.tar.gz) = lXG0uFSE5Gs7EPB8y6d6H6l9YGYLMoWfmQ7/77MAX5E=
-SIZE (memcached-1.4.5.tar.gz) = 302516
+MD5 (memcached-1.4.10.tar.gz) = jhgFTsXt/Zb33ofwJiIFKg==
+RMD160 (memcached-1.4.10.tar.gz) = Z/Rne6ZEsbFRUaaGWoN3lm/hlwY=
+SHA1 (memcached-1.4.10.tar.gz) = CuMA+Fi3Z6v4EgCdU+1YZHzrSYo=
+SHA256 (memcached-1.4.10.tar.gz) = LMPeNBtWFGTaKfxdXipPrMD2qvwVHw4dlCKHBeB1j98=
+SIZE (memcached-1.4.10.tar.gz) = 311926
Index: pkg/MESSAGE
===
RCS file: /cvs/ports/misc/memcached/pkg/MESSAGE,v
retrieving revision 1.1
diff -u -r1.1 MESSAGE
--- pkg/MESSAGE 7 Aug 2009 10:46:41 -   1.1
+++ pkg/MESSAGE 14 Nov 2011 09:33:08 -
@@ -1,13 +1,3 @@
-To start memcached at boot time, add the following to /etc/rc.local:
-
-if [ -x ${PREFIX}/bin/memcached ]; then
-echo -n ' memcached'
-${PREFIX}/bin/memcached -d \
-   -u _memcached -P /var/run/memcached.pid
-fi
-
-To see further configuration options, run memcached -h.
-
 Since memcached has no authentication mechanisms, it is designed for
 internal use only, and should be firewalled accordingly. You may wish
 to add a rule such as the following to /etc/pf.conf:
Index: pkg/PLIST
===
RCS file: /cvs/ports/misc/memcached/pkg/PLIST,v
retrieving revision 1.5
diff -u -r1.5 PLIST
--- pkg/PLIST   21 Apr 2010 12:23:37 -  1.5
+++ pkg/PLIST   14 Nov 2011 09:33:08 -
@@ -8,4 +8,4 @@
 share/doc/memcached/
 share/doc/memcached/protocol.txt
 share/doc/memcached/readme.txt
-share/doc/memcached/threads.txt
+@rcscript ${RCDIR}/memcached
Index: pkg/memcached.rc
===
RCS file: pkg/memcached.rc
diff -N pkg/memcached.rc
--- /dev/null   1 Jan 1970 00:00:00 -
+++ pkg/memcached.rc14 Nov 2011 09:33:08 -
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon=${TRUEPREFIX}/bin/memcached -d
+daemon_flags=-u _memcached -P /var/run/memcached.pid
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1



Re: UPDATE misc/memcached

2011-12-15 Thread Sebastian Reitenbach
 
On Tuesday, November 22, 2011 00:09 CET, Sebastian Reitenbach 
sebas...@l00-bugdead-prods.de wrote: 
 
  
 On Monday, November 14, 2011 11:14 CET, Sebastian Reitenbach 
 sebas...@l00-bugdead-prods.de wrote: 
  
  Hi,
  
  updated memcached to 1.4.10, and added a rc script, which was long overdue 
  ;)
  
  Tested with www/sogo, and updated libmemcached which will come in next 
  mail. It seems to still work well with the new version.
  
  is it OK?
  
  Sebastian 
  
  
 ping!

pong.

 
 reattached to ease review.
 
 Sebastian
 
  
 
 
 
 
? memcached-1.4.10.diff
Index: Makefile
===
RCS file: /cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	11 Jul 2011 12:13:03 -	1.15
+++ Makefile	14 Nov 2011 09:33:08 -
@@ -2,8 +2,7 @@
 
 COMMENT=	distributed memory object caching system
 
-DISTNAME=	memcached-1.4.5
-REVISION=	0
+DISTNAME =	memcached-1.4.10
 CATEGORIES=	misc
 
 HOMEPAGE=	http://www.danga.com/memcached/
Index: distinfo
===
RCS file: /cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo	14 Oct 2010 12:33:03 -	1.10
+++ distinfo	14 Nov 2011 09:33:08 -
@@ -1,5 +1,5 @@
-MD5 (memcached-1.4.5.tar.gz) = WDRBol+Tc2BiQCTyiB5eqA==
-RMD160 (memcached-1.4.5.tar.gz) = wfU0+8WFoeoDO70S1vyUx3oIUDI=
-SHA1 (memcached-1.4.5.tar.gz) = x9ZRd2S4LSOuLedrVsJJQ0PFPwI=
-SHA256 (memcached-1.4.5.tar.gz) = lXG0uFSE5Gs7EPB8y6d6H6l9YGYLMoWfmQ7/77MAX5E=
-SIZE (memcached-1.4.5.tar.gz) = 302516
+MD5 (memcached-1.4.10.tar.gz) = jhgFTsXt/Zb33ofwJiIFKg==
+RMD160 (memcached-1.4.10.tar.gz) = Z/Rne6ZEsbFRUaaGWoN3lm/hlwY=
+SHA1 (memcached-1.4.10.tar.gz) = CuMA+Fi3Z6v4EgCdU+1YZHzrSYo=
+SHA256 (memcached-1.4.10.tar.gz) = LMPeNBtWFGTaKfxdXipPrMD2qvwVHw4dlCKHBeB1j98=
+SIZE (memcached-1.4.10.tar.gz) = 311926
Index: pkg/MESSAGE
===
RCS file: /cvs/ports/misc/memcached/pkg/MESSAGE,v
retrieving revision 1.1
diff -u -r1.1 MESSAGE
--- pkg/MESSAGE	7 Aug 2009 10:46:41 -	1.1
+++ pkg/MESSAGE	14 Nov 2011 09:33:08 -
@@ -1,13 +1,3 @@
-To start memcached at boot time, add the following to /etc/rc.local:
-
-if [ -x ${PREFIX}/bin/memcached ]; then
-echo -n ' memcached'
-${PREFIX}/bin/memcached -d \
-   -u _memcached -P /var/run/memcached.pid
-fi
-
-To see further configuration options, run memcached -h.
-
 Since memcached has no authentication mechanisms, it is designed for
 internal use only, and should be firewalled accordingly. You may wish
 to add a rule such as the following to /etc/pf.conf:
Index: pkg/PLIST
===
RCS file: /cvs/ports/misc/memcached/pkg/PLIST,v
retrieving revision 1.5
diff -u -r1.5 PLIST
--- pkg/PLIST	21 Apr 2010 12:23:37 -	1.5
+++ pkg/PLIST	14 Nov 2011 09:33:08 -
@@ -8,4 +8,4 @@
 share/doc/memcached/
 share/doc/memcached/protocol.txt
 share/doc/memcached/readme.txt
-share/doc/memcached/threads.txt
+@rcscript ${RCDIR}/memcached
Index: pkg/memcached.rc
===
RCS file: pkg/memcached.rc
diff -N pkg/memcached.rc
--- /dev/null	1 Jan 1970 00:00:00 -
+++ pkg/memcached.rc	14 Nov 2011 09:33:08 -
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon=${TRUEPREFIX}/bin/memcached
+daemon_flags=-d -u _memcached -P /var/run/memcached.pid
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1


Re: UPDATE misc/memcached

2011-11-21 Thread Sebastian Reitenbach
 
On Monday, November 14, 2011 11:14 CET, Sebastian Reitenbach 
sebas...@l00-bugdead-prods.de wrote: 
 
 Hi,
 
 updated memcached to 1.4.10, and added a rc script, which was long overdue ;)
 
 Tested with www/sogo, and updated libmemcached which will come in next mail. 
 It seems to still work well with the new version.
 
 is it OK?
 
 Sebastian 
 
 
ping!

reattached to ease review.

Sebastian

 


memcached-1.4.10.diff
Description: Binary data


UPDATE misc/memcached

2011-11-14 Thread Sebastian Reitenbach
Hi,

updated memcached to 1.4.10, and added a rc script, which was long overdue ;)

Tested with www/sogo, and updated libmemcached which will come in next mail. It 
seems to still work well with the new version.

is it OK?

Sebastian

memcached-1.4.10.diff
Description: Binary data


UPDATE misc/memcached (from 1.2.8 to 1.4.0)

2009-08-01 Thread Scott Vokes
These patches update memcached to 1.4.0. Its release notes say, Many
notable improvements have been made, and upgrading is recommended.

The third patch adds new user/group 634 _memcached to user.list.

Please test and commit.

Scott


memcached-patches-patch
Description: Binary data


memcached-user.list-patch
Description: Binary data


memcached-patch
Description: Binary data


Re: UPDATE: misc/memcached

2009-04-20 Thread Alexander Hall
Scott Vokes wrote:
 This updates memcached from 1.2.6 to 1.2.8 (they strongly encourage updating).
 
 Please note that the patch-memcached_c file is no longer necessary,
 and should be deleted.

I don't use memcahced on anything -current, so I cannot test it, but
FYI, something along

$ rm patches/patch-memcached_c
$ cvs delete patches/patch-memcached_c
$ cvs -q diff -uNp

should make the deletion included in your diff.


/Alexander



UPDATE: misc/memcached

2009-04-19 Thread Scott Vokes
This updates memcached from 1.2.6 to 1.2.8 (they strongly encourage updating).

Please note that the patch-memcached_c file is no longer necessary,
and should be deleted.

Tested on amd64. Please test and commit.

Scott


memcached.patch
Description: Binary data


UPDATE: misc/memcached

2008-11-06 Thread arn
Trivial diff to update memcached to it's latest stable version.


memcached-1.2.6.diff
Description: Binary data


Re: [+] UPDATE: misc/memcached

2008-11-06 Thread Frank Denis
Le Thu, Nov 06, 2008 at 11:03:12AM +0300, [EMAIL PROTECTED] ecrivait :
 Trivial diff to update memcached to it's latest stable version.

  Works very well.
  
  It looks the way it manages its stored objects has changed a bit, and with
the same high water limit, it takes longer before it starts pruning entries.

  Thanks for the update.

-- 
Frank Denis - j [at] pureftpd.org - http://00f.net - http://www.cotery.com



Re: UPDATE: misc/memcached

2008-11-06 Thread Stuart Henderson
On 2008/11/06 11:03, [EMAIL PROTECTED] wrote:
 Trivial diff to update memcached to it's latest stable version.

/usr/ports/packages/amd64/all/memcached-1.2.6.tgz:
Extra: pthread.11



Re: UPDATE: misc/memcached

2008-11-06 Thread arn
On Thu, 6 Nov 2008 12:27:02 +
Stuart Henderson [EMAIL PROTECTED] wrote:
 /usr/ports/packages/amd64/all/memcached-1.2.6.tgz:
 Extra: pthread.11
 

Thanks. Here is updated diff.


memcached-1.2.6.diff
Description: Binary data