pkgsrc-WIP-changes archive

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

dma: Explain suid plan



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Mon Nov 23 14:26:28 2026 -0500
Changeset:	ad8a9dd74e4284ba1ddff6550d4ac234d9070d2a

Modified Files:
	dma/Makefile

Log Message:
dma: Explain suid plan

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ad8a9dd74e4284ba1ddff6550d4ac234d9070d2a

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 dma/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diffs:
diff --git a/dma/Makefile b/dma/Makefile
index b6f4db14ad..0a8d3c1b47 100644
--- a/dma/Makefile
+++ b/dma/Makefile
@@ -36,15 +36,23 @@ DMA_SPOOLDIR=	${VARBASE}/spool/dma
 OWN_DIRS_PERMS+=	${DMA_SPOOLDIR} ${UNPRIVILEGED_USER} ${UNPRIVILEGED_GROUP} 0700
 .else
 OWN_DIRS_PERMS+=	${DMA_SPOOLDIR} ${DMA_ROOT_USER} ${DMA_GROUP} 0770
+# Upstream makefile sets sgid/suid but we patched that out.
+# dma is sgid for queue access
 SPECIAL_PERMS+=		${PREFIX}/libexec/dma \
 			${REAL_ROOT_USER} ${DMA_GROUP} 2555
+# dma-mbox-create is a suid-root helper for dma, only.   Upstream's makefile
+# grants other read permission for unclear reasons; mirror that as not harmful.
 SPECIAL_PERMS+=		${PREFIX}/libexec/dma-mbox-create \
 			${REAL_ROOT_USER} ${DMA_GROUP} 4554
 PKG_GROUPS=		${DMA_GROUP}
 PKG_USERS=		${DMA_ROOT_USER}:${DMA_GROUP}
 .endif
 
-# DMA provides its own getprogname() on glibc.
+# dma has awkward getprogname detection; essentially one must define
+# HAVE_ on any system without glibc (and getprogname must be present),
+# and one should not define it on glibc systems.  We use OPSYS Linux
+# as a probably-good-enough proxy for glibc.
+# TODO: File an upstream issue to improve getprogname choice.
 .if ${OPSYS} != "Linux"
 CFLAGS+=	-DHAVE_GETPROGNAME
 .endif


Home | Main Index | Thread Index | Old Index