git: 546987291380 - stable/14 - certctl: Set METALOG ownership to root:wheel

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Thu, 20 Feb 2025 13:07:45 UTC
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=5469872913809c35731605e479f2128ddf75c001

commit 5469872913809c35731605e479f2128ddf75c001
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-02-04 13:48:55 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-02-20 13:07:17 +0000

    certctl: Set METALOG ownership to root:wheel
    
    This sets the correct ownership values when building base.txz
    
    install(1) does not validate the arguments passed to -o or -g
    (see PR283355) so there's no need to have the passwd db available
    for now.  Future work includes plumbing the appropriate passwd db
    path through certctl, and validating uid and gid in install(1).
    
    PR:             283340
    Reviewed by:    jrtc27
    Differential Revision: https://reviews.freebsd.org/D48506
    
    (cherry picked from commit 10fa3f2518d4582c98d74527f79af9f30b1eceab)
    (cherry picked from commit 98bebc20cef7527ccb15f8defc9d52e803a0d506)
    (cherry picked from commit 4d15b58365ea706129bedfdb37e0c5e8661a640f)
---
 usr.sbin/certctl/certctl.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh
index 02d055102c33..5af8fecb93ac 100755
--- a/usr.sbin/certctl/certctl.sh
+++ b/usr.sbin/certctl/certctl.sh
@@ -5,7 +5,7 @@
 # Copyright 2018 Allan Jude <allanjude@freebsd.org>
 #
 # Redistribution and use in source and binary forms, with or without
-# modification, are permitted providing that the following conditions 
+# modification, are permitted providing that the following conditions
 # are met:
 # 1. Redistributions of source code must retain the above copyright
 #    notice, this list of conditions and the following disclaimer.
@@ -303,7 +303,7 @@ fi
 : ${METALOG:=${DESTDIR}/METALOG}
 INSTALLFLAGS=
 if "$UNPRIV" ; then
-	INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR}"
+	INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR} -o root -g wheel"
 fi
 : ${LOCALBASE:=$(sysctl -n user.localbase)}
 : ${TRUSTPATH:=${DESTDIR}${DISTBASE}/usr/share/certs/trusted:${DESTDIR}${LOCALBASE}/share/certs:${DESTDIR}${LOCALBASE}/etc/ssl/certs}