opendoas: update to 0.2.

This commit is contained in:
Duncaen 2016-06-05 14:20:11 +02:00
parent 9174466294
commit 4ae3bc95ef
2 changed files with 5 additions and 47 deletions

View file

@ -1,42 +0,0 @@
--- bsd.prog.mk
+++ bsd.prog.mk
@@ -14,7 +14,7 @@ libopenbsd.a: ${OPENBSD}
${AR} -r $@ $?
${PROG}: ${OBJS} libopenbsd.a
- ${CC} ${CFLAGS} ${LDFLAGS} $^ -o $@
+ ${CC} ${CFLAGS} $^ -o $@ ${LDFLAGS}
install: ${PROG} ${PAM_DOAS} ${MAN}
mkdir -p -m 0755 ${DESTDIR}${BINDIR}
@@ -22,7 +22,6 @@ install: ${PROG} ${PAM_DOAS} ${MAN}
mkdir -p -m 0755 ${DESTDIR}${MANDIR}/man1
mkdir -p -m 0755 ${DESTDIR}${MANDIR}/man5
cp -f ${PROG} ${DESTDIR}${BINDIR}
- chown ${BINOWN}:${BINGRP} ${DESTDIR}${BINDIR}/${PROG}
chmod ${BINMODE} ${DESTDIR}${BINDIR}/${PROG}
cp ${PAM_DOAS} ${DESTDIR}${PAMDIR}/doas
chmod 0644 ${DESTDIR}${PAMDIR}/doas
--- doas.c
+++ doas.c
@@ -295,7 +295,9 @@ checkconfig(const char *confpath, int argc, char **argv,
{
struct rule *rule;
- setresuid(uid, uid, uid);
+ if (setresuid(uid, uid, uid) != 0)
+ err(1, "can't setresuid");
+
parseconfig(confpath, 0);
if (!argc)
exit(0);
--- libopenbsd/openbsd.h
+++ libopenbsd/openbsd.h
@@ -3,7 +3,6 @@
#include <stdarg.h>
#include <sys/types.h>
-#include <sys/cdefs.h>
#include "readpassphrase.h"

View file

@ -1,6 +1,6 @@
# Template file for 'opendoas'
pkgname=opendoas
version=0.1
version=0.2
revision=1
wrksrc="OpenDoas-$version"
build_style=configure
@ -12,13 +12,13 @@ maintainer="Duncaen <duncaen@voidlinux.eu>"
license="BSD"
homepage="https://github.com/Duncaen/OpenDoas"
distfiles="https://github.com/Duncaen/OpenDoas/archive/v${version}.tar.gz"
checksum=468fb97307e4ac4c6b92931a2e315fd2b6201f7e82a4db25ec2aa6f6d8b3627e
CFLAGS="-Wno-unused-result"
checksum=67ed58ba9e5f7cf838945d0601fc468a2bd03e2993269dd65f575fc2975ee259
pre_configure() {
cp ${FILESDIR}/doas.pam pam.d__doas__linux
export VERSION=$version BINGRP=root
sed -i bsd.prog.mk \
-e '/chown ${BINOWN}:${BINGRP}/d' \
-e '/chmod ${BINMODE}/d'
}
post_install() {