Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Klemens Nanni
On Wed, Jul 29, 2020 at 09:05:14AM -0600, Theo de Raadt wrote: > Claudio Jeker wrote: > > But: > > $ route -T2 exec id -R > > 2 > > $ route -T2 exec route -T0 exec id -R > > route: setrtable: Operation not permitted > > > > Only root can change the rdomain if it is currently != 0.

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Theo de Raadt
Claudio Jeker wrote: > On Wed, Jul 29, 2020 at 04:43:18PM +0200, Klemens Nanni wrote: > > On Wed, Jul 29, 2020 at 05:33:14PM +0300, Kapetanakis Giannis wrote: > > > Wouldn't this break those who already have > > > !route -T2  > > > > > > in their hostname.if files? > > No, > > > > $ route -

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Kapetanakis Giannis
On 29/07/2020 17:43, Klemens Nanni wrote: > On Wed, Jul 29, 2020 at 05:33:14PM +0300, Kapetanakis Giannis wrote: >> Wouldn't this break those who already have >> !route -T2  >> >> in their hostname.if files? > No, > > $ route -T1 exec id -R > 1 > $ route -T0 exec route -T1 exec id

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Claudio Jeker
On Wed, Jul 29, 2020 at 04:43:18PM +0200, Klemens Nanni wrote: > On Wed, Jul 29, 2020 at 05:33:14PM +0300, Kapetanakis Giannis wrote: > > Wouldn't this break those who already have > > !route -T2  > > > > in their hostname.if files? > No, > > $ route -T1 exec id -R > 1 > $ route

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Theo de Raadt
You were already able to execute a !command inside the rdomain, either by specifying the rdomain (on commands which can do that) or by using route -T manually. But now, you can't easily execute commands *outside the rdomain*, and there are some things folk might want to do. Also, there is an orde

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Klemens Nanni
On Wed, Jul 29, 2020 at 05:33:14PM +0300, Kapetanakis Giannis wrote: > Wouldn't this break those who already have > !route -T2  > > in their hostname.if files? No, $ route -T1 exec id -R 1 $ route -T0 exec route -T1 exec id -R 1

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Kapetanakis Giannis
On 29/07/2020 12:54, Matthieu Herrb wrote: > Hi, > > When I'm configuring an interface with a spécific rdomain, I'd assume > that '!' commands (especially /sbin/route commands) are executed in > the rdomain for this interface. > > I know that parsing this file is complex and somehow fragile but sti

Re: hostname.if '!' commands and rdomains

2020-07-29 Thread Klemens Nanni
On Wed, Jul 29, 2020 at 11:54:17AM +0200, Matthieu Herrb wrote: > When I'm configuring an interface with a spécific rdomain, I'd assume > that '!' commands (especially /sbin/route commands) are executed in > the rdomain for this interface. I see where you're coming from, but the diff seems flawed.

hostname.if '!' commands and rdomains

2020-07-29 Thread Matthieu Herrb
Hi, When I'm configuring an interface with a spécific rdomain, I'd assume that '!' commands (especially /sbin/route commands) are executed in the rdomain for this interface. I know that parsing this file is complex and somehow fragile but still I tried to write a patch. What do you think ? Of c