Re: make build as root fails when SUDO=doas

2018-12-14 Thread Marc Espie
On Fri, Dec 14, 2018 at 03:57:12PM -0500, Ted Unangst wrote: > Marc Espie wrote: > > Well, apart from the bike-shedding, it seems like the most correct > > short-term solution. > > > > So I will commit it tomorrow, unless someone has an actual better idea. > > Nobody answered if SUDO_CLEAN is

Re: make build as root fails when SUDO=doas

2018-12-14 Thread Ted Unangst
Marc Espie wrote: > Well, apart from the bike-shedding, it seems like the most correct > short-term solution. > > So I will commit it tomorrow, unless someone has an actual better idea. Nobody answered if SUDO_CLEAN is actualy set. I checked. It's not. Index: Makefile

Re: make build as root fails when SUDO=doas

2018-12-14 Thread Marc Espie
On Wed, Dec 12, 2018 at 11:12:17AM +0100, Alexander Bluhm wrote: > On Tue, Dec 11, 2018 at 11:00:30PM +0100, Marc Espie wrote: > > Ah, so actually just > > rm -f ${SUDO_CLEAN} > > > > should be fine ? > > Regress jumps from root to non-root in a very inconsistent way. It > could be

Re: make build as root fails when SUDO=doas

2018-12-12 Thread Alexander Bluhm
On Tue, Dec 11, 2018 at 11:00:30PM +0100, Marc Espie wrote: > Ah, so actually just > rm -f ${SUDO_CLEAN} > > should be fine ? Regress jumps from root to non-root in a very inconsistent way. It could be improved, but that would be a lot of work. The result will not be perfect as tests

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Ted Unangst
Marc Espie wrote: > There is a kind of mixed model there. > > Because make build still goes thru regress for obj and cleandir > > Yet the rest of the build doesn't! > > So, if we agree that it needs to stay the way it currently is, then > the SUDO in that Makefile might trigger while running as

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Marc Espie
On Tue, Dec 11, 2018 at 10:55:25PM +0100, Claudio Jeker wrote: > On Tue, Dec 11, 2018 at 02:35:33PM -0700, Theo de Raadt wrote: > > Ted Unangst wrote: > > > > > Marc Espie wrote: > > > > > > - try to remove the files normally first > > > > > > rm -f ${SUDO_CLEAN} || test -z "${SUDO}" ||

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Marc Espie
On Tue, Dec 11, 2018 at 02:35:33PM -0700, Theo de Raadt wrote: > Ted Unangst wrote: > > > Marc Espie wrote: > > > > > - try to remove the files normally first > > > > > rm -f ${SUDO_CLEAN} || test -z "${SUDO}" || ${SUDO} rm -f > > > > > ${SUDO_CLEAN} > > > > > > > > > > this should

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Theo de Raadt
Claudio Jeker wrote: > I think the main issue is that /usr/sr/regress was not moved to the > priv-drop security model. There is bunch of code which needs root but I > don't want to run all of regress as user root. regress is very special

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Claudio Jeker
On Tue, Dec 11, 2018 at 02:35:33PM -0700, Theo de Raadt wrote: > Ted Unangst wrote: > > > Marc Espie wrote: > > > > > - try to remove the files normally first > > > > > rm -f ${SUDO_CLEAN} || test -z "${SUDO}" || ${SUDO} rm -f > > > > > ${SUDO_CLEAN} > > > > > > > > > > this should

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Theo de Raadt
Ted Unangst wrote: > Marc Espie wrote: > > > > - try to remove the files normally first > > > > rm -f ${SUDO_CLEAN} || test -z "${SUDO}" || ${SUDO} rm -f > > > > ${SUDO_CLEAN} > > > > > > > > this should actually fix the issue. > > > > > > > > Any other directory with that problem ?

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Ted Unangst
Marc Espie wrote: > > > - try to remove the files normally first > > > rm -f ${SUDO_CLEAN} || test -z "${SUDO}" || ${SUDO} rm -f > > > ${SUDO_CLEAN} > > > > > > this should actually fix the issue. > > > > > > Any other directory with that problem ? > > > > that fix the issue and the

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Marc Espie
On Tue, Dec 11, 2018 at 06:50:07PM +0100, Solene Rapenne wrote: > Marc Espie wrote: > > On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > > > hi > > > > > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make > > > build` > > > in /usr/src as root if

Re: make build as root fails when SUDO=doas

2018-12-11 Thread Solene Rapenne
Marc Espie wrote: > On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > > hi > > > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make > > build` > > in /usr/src as root if /etc/doas.conf doesn't have a line "permit nopass > > root > > as root". This fails

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Marc Espie
On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > hi > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make build` > in /usr/src as root if /etc/doas.conf doesn't have a line "permit nopass root > as root". This fails when using "doas" in regress/usr/bin/ssh/ >

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Stuart Henderson
On 2018/12/10 23:28, Marc Espie wrote: > On Mon, Dec 10, 2018 at 08:17:04PM +0100, Anton Lindqvist wrote: > > On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > > > hi > > > > > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make > > > build` > > > in /usr/src

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Marc Espie
On Mon, Dec 10, 2018 at 03:37:48PM -0500, Ted Unangst wrote: > Solene Rapenne wrote: > > Not sure how to fix it. Maybe people shouldn't try to compile as root when > > having SUDO=doas set and then, it's not an issue anymore? > > yeah, i would say this is an issue of your own making. you ask to

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Marc Espie
On Mon, Dec 10, 2018 at 08:17:04PM +0100, Anton Lindqvist wrote: > On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > > hi > > > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make > > build` > > in /usr/src as root if /etc/doas.conf doesn't have a line

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Ted Unangst
Solene Rapenne wrote: > Not sure how to fix it. Maybe people shouldn't try to compile as root when > having SUDO=doas set and then, it's not an issue anymore? yeah, i would say this is an issue of your own making. you ask to use doas, make is going to use doas.

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Anton Lindqvist
On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > hi > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make build` > in /usr/src as root if /etc/doas.conf doesn't have a line "permit nopass root > as root". This fails when using "doas" in regress/usr/bin/ssh/ >

make build as root fails when SUDO=doas

2018-12-10 Thread Solene Rapenne
hi I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make build` in /usr/src as root if /etc/doas.conf doesn't have a line "permit nopass root as root". This fails when using "doas" in regress/usr/bin/ssh/ doas: Operation not permitted *** Error 1 in regress/usr.bin/ssh