Date: Thu, 07 Oct 2021 19:50:15 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 258990] [PATCH] security/acme.sh: Fix $DEFAULT_INSTALL_HOME Message-ID: <bug-258990-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258990 Bug ID: 258990 Summary: [PATCH] security/acme.sh: Fix $DEFAULT_INSTALL_HOME Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: dvl@FreeBSD.org Reporter: jlduran@gmail.com Flags: maintainer-feedback?(dvl@FreeBSD.org) Assignee: dvl@FreeBSD.org Created attachment 228504 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D228504&action= =3Dedit security/acme.sh: Fix $DEFAULT_INSTALL_HOME This is more a request for comments from the maintainer/community, than a b= ug report: While facing an issue, best described here: https://github.com/acmesh-official/acme.sh/issues/3724 The solution was to set a preferred chain[1], by running: # su -l acme -c "acme.sh --set-default-chain --preferred-chain ISRG --server letsencrypt" However --and this is where I might get this port wrong-- I believe the ide= a is that you could also run acme.sh as root and get the same result. The problem is acme.sh defines $DEFAULT_INSTALL_HOME as $HOME/.$PROJECT_NAM= E. If acme.sh is executed as root, it will use root's $HOME as part of $DEFAULT_INSTALL_HOME, and files created under that path will be ignored. For example, when issuing: # acme.sh --set-default-chain --preferred-chain ISRG --server letsencry= pt To set the preferred chain, a new $_DEFAULT_CA_CONF file under /root/.acme.sh/ca/$_ACME_SERVER_HOST/$_ACME_SERVER_PATH/ca.conf with the contents "DEFAULT_PREFERRED_CHAIN=3D'ISRG'" will be created, inste= ad of appending to /var/db/acme/.acme.sh/ca/$_ACME_SERVER_HOST/$_ACME_SERVER_PATH/ca.conf While this can be avoided by su'ing as acme, given the hard-coded nature of acme's $HOME, I believe it's better to patch $DEFAULT_INSTALL_HOME to preve= nt foot-shootings. What do you think? [1]: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258990-7788>