Update to 1.5.3
disable no_drop_privileges option to be sure pledge(2) will be always enabled hints & ok jca@
This commit is contained in:
parent
21857115ac
commit
e823cacd8d
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.39 2017/10/31 07:39:25 giovanni Exp $
|
||||
# $OpenBSD: Makefile,v 1.40 2017/12/21 14:56:43 giovanni Exp $
|
||||
|
||||
COMMENT= distributed memory object caching system
|
||||
|
||||
DISTNAME= memcached-1.5.2
|
||||
DISTNAME= memcached-1.5.3
|
||||
CATEGORIES= misc
|
||||
|
||||
HOMEPAGE= https://www.memcached.org/
|
||||
|
@ -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
|
||||
|
@ -1,8 +1,8 @@
|
||||
$OpenBSD: patch-configure,v 1.10 2017/10/31 07:39:25 giovanni Exp $
|
||||
$OpenBSD: patch-configure,v 1.11 2017/12/21 14:56:43 giovanni Exp $
|
||||
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`
|
||||
|
@ -1,31 +1,15 @@
|
||||
$OpenBSD: patch-memcached_c,v 1.14 2017/10/31 07:39:25 giovanni Exp $
|
||||
$OpenBSD: patch-memcached_c,v 1.15 2017/12/21 14:56:43 giovanni Exp $
|
||||
|
||||
Index: memcached.c
|
||||
--- memcached.c.orig
|
||||
+++ memcached.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
/* 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 option unsupported on this operating system.\n");
|
||||
+ exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Drop privileges no longer needed */
|
||||
/* Initialize the uriencode lookup table. */
|
||||
|
Loading…
Reference in New Issue
Block a user