Date: Fri, 18 Sep 2020 22:24:51 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r365891 - in stable: 11/usr.sbin/certctl 12/usr.sbin/certctl Message-ID: <202009182224.08IMOpod040609@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Fri Sep 18 22:24:51 2020 New Revision: 365891 URL: https://svnweb.freebsd.org/changeset/base/365891 Log: MFC r365756: certctl: fix unprivileged mode The first issue was lack of quoting around INSTALLFLAGS, which set it incorrectly and produced an error on -M. The second issue was that we weren't actually doing the install in unprivileged mode, making it effectively useless. This was designed to pass through the proper metalog/unpriv flags to install(1), so just let it happen. Modified: stable/11/usr.sbin/certctl/certctl.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/certctl/certctl.sh Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/certctl/certctl.sh ============================================================================== --- stable/11/usr.sbin/certctl/certctl.sh Fri Sep 18 20:53:40 2020 (r365890) +++ stable/11/usr.sbin/certctl/certctl.sh Fri Sep 18 22:24:51 2020 (r365891) @@ -129,7 +129,7 @@ do_scan() [ -d "$CPATH" ] || continue echo "Scanning $CPATH for certificates..." for CFILE in $(ls -1 "${CPATH}" | grep -Ee "${FILEPAT}"); do - [ -e "$CPATH/$CFILE" -a $UNPRIV -eq 0 ] || continue + [ -e "$CPATH/$CFILE" ] || continue [ $VERBOSE -gt 0 ] && echo "Reading $CFILE" "$CFUNC" "$CPATH/$CFILE" done @@ -263,7 +263,7 @@ shift $(( $OPTIND - 1 )) : ${METALOG:=${DESTDIR}/METALOG} INSTALLFLAGS= -[ $UNPRIV -eq 1 ] && INSTALLFLAGS=-U -M ${METALOG} -D ${DESTDIR} +[ $UNPRIV -eq 1 ] && INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR}" : ${TRUSTPATH:=${DESTDIR}/usr/share/certs/trusted:${DESTDIR}/usr/local/share/certs:${DESTDIR}/usr/local/etc/ssl/certs} : ${BLACKLISTPATH:=${DESTDIR}/usr/share/certs/blacklisted:${DESTDIR}/usr/local/etc/ssl/blacklisted} : ${CERTDESTDIR:=${DESTDIR}/etc/ssl/certs}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009182224.08IMOpod040609>