pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/doas doas: Use setusercontext(3)



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bc1a531f258f
branches:  trunk
changeset: 440922:bc1a531f258f
user:      kim <kim%pkgsrc.org@localhost>
date:      Wed Oct 21 17:34:09 2020 +0000

description:
doas: Use setusercontext(3)

Calling setusercontext(3) makes per-user temporary storage work (see
per_user_tmp in security(7) and rc.conf(5)).

May as well use our reallocarray(3) instead of the bundled compat code.

diffstat:

 security/doas/Makefile                      |   4 ++--
 security/doas/distinfo                      |   4 +++-
 security/doas/patches/patch-Makefile        |  18 ++++++++++++++++++
 security/doas/patches/patch-compat_compat.h |  16 ++++++++++++++++
 4 files changed, 39 insertions(+), 3 deletions(-)

diffs (68 lines):

diff -r 4baa8e33e19c -r bc1a531f258f security/doas/Makefile
--- a/security/doas/Makefile    Wed Oct 21 15:25:23 2020 +0000
+++ b/security/doas/Makefile    Wed Oct 21 17:34:09 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2020/10/21 15:25:23 kim Exp $
+# $NetBSD: Makefile,v 1.11 2020/10/21 17:34:09 kim Exp $
 
 DISTNAME=      doas-6.2p4
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    security
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=slicer69/}
 
diff -r 4baa8e33e19c -r bc1a531f258f security/doas/distinfo
--- a/security/doas/distinfo    Wed Oct 21 15:25:23 2020 +0000
+++ b/security/doas/distinfo    Wed Oct 21 17:34:09 2020 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.5 2020/01/01 01:30:19 ng0 Exp $
+$NetBSD: distinfo,v 1.6 2020/10/21 17:34:09 kim Exp $
 
 SHA1 (doas-6.2p4.tar.gz) = dd90972c3a120ae2b96432bae2c7a78c4c729166
 RMD160 (doas-6.2p4.tar.gz) = a8ed8677fbffd48bf87b4fa5c6b0dd98f0c5e428
 SHA512 (doas-6.2p4.tar.gz) = 951686a58300ab6ffcdd7b98502df832b35c43787234c52c71c42eaca9e4dbeb1c2e33e7535a9b8babdb2f38840f6cff1045f6a90fa609029590e7c1384b8a75
 Size (doas-6.2p4.tar.gz) = 26098 bytes
+SHA1 (patch-Makefile) = 710303b7c858f0d94f0f8bdd873a87e2600f72d0
+SHA1 (patch-compat_compat.h) = b49d6a64f5ee6308446184891b8ece32c919b95a
diff -r 4baa8e33e19c -r bc1a531f258f security/doas/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/doas/patches/patch-Makefile      Wed Oct 21 17:34:09 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-Makefile,v 1.1 2020/10/21 17:34:09 kim Exp $
+
+Enable HAVE_LOGIN_CAP_H and reallocarray() on NetBSD.
+
+--- Makefile
++++ Makefile
+@@ -24,6 +24,11 @@ ifeq ($(UNAME_S),FreeBSD)
+     CFLAGS+=-DHAVE_LOGIN_CAP_H
+     LDFLAGS+=-lutil
+ endif
++ifeq ($(UNAME_S),NetBSD)
++    CFLAGS+=-DHAVE_LOGIN_CAP_H -D_OPENBSD_SOURCE
++    OBJECTS=doas.o env.o y.tab.o
++    LDFLAGS+=-lutil
++endif
+ ifeq ($(UNAME_S),SunOS)
+     SAFE_PATH?=/bin:/sbin:/usr/bin:/usr/sbin:$(PREFIX)/bin:$(PREFIX)/sbin
+     GLOBAL_PATH?=/bin:/sbin:/usr/bin:/usr/sbin:$(PREFIX)/bin:$(PREFIX)/sbin
diff -r 4baa8e33e19c -r bc1a531f258f security/doas/patches/patch-compat_compat.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/doas/patches/patch-compat_compat.h       Wed Oct 21 17:34:09 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-compat_compat.h,v 1.1 2020/10/21 17:34:09 kim Exp $
+
+Do not provide a prototype for reallocarray(3) on NetBSD.
+
+--- compat/compat.h
++++ compat/compat.h
+@@ -13,7 +13,9 @@ extern const char *__progname;
+ 
+ const char *getprogname(void);
+ 
++#if !defined(__NetBSD__)
+ void *reallocarray(void *optr, size_t nmemb, size_t size);
++#endif
+ 
+ void setprogname(const char *progname);
+ 



Home | Main Index | Thread Index | Old Index