public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* iwd doesn't work with openresolv
@ 2021-12-27 11:38 Yuri Kanivetsky
  0 siblings, 0 replies; 3+ messages in thread
From: Yuri Kanivetsky @ 2021-12-27 11:38 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

Hi,

If I run it as is, I get:

Dec 27 13:27:21 yuri iwd[716]: cp: cannot create regular file
'/etc/resolv.conf.bak': Read-only file system
Dec 27 13:27:21 yuri iwd[717]: /usr/lib/resolvconf/libc: line 230:
/etc/resolv.conf: Read-only file system
Dec 27 13:27:21 yuri iwd[761]: cp: cannot create regular file
'/etc/resolv.conf.bak': Read-only file system
Dec 27 13:27:21 yuri iwd[762]: /usr/lib/resolvconf/libc: line 230:
/etc/resolv.conf: Read-only file system

I can work around it by:

touch /etc/resolv.conf.bak

and overriding:

[Service]
ReadWritePaths=/etc/resolv.conf.bak
ReadWritePaths=/etc/resolv.conf

Others suggested another way to fix it:

RuntimeDirectory=resolvconf
ReadWritePaths=/etc/resolv.conf

https://bugs.archlinux.org/task/67069

Can src/iwd.service.in be adjusted?

Regards,
Yuri

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iwd doesn't work with openresolv
@ 2022-01-03 19:05 Denis Kenzior
  2026-02-28 15:34 ` Diederik de Haas
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kenzior @ 2022-01-03 19:05 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Hi Yuri,

<snip>

> [Service]
> ReadWritePaths=/etc/resolv.conf.bak
> ReadWritePaths=/etc/resolv.conf
> 
> Others suggested another way to fix it:
> 
> RuntimeDirectory=resolvconf
> ReadWritePaths=/etc/resolv.conf
> 
> https://bugs.archlinux.org/task/67069
> 
> Can src/iwd.service.in be adjusted?

I think this or a similar issue has come up before.  The problem is that iwd 
supports either systemd-resolved or resolvconf.  So for systems that use 
systemd-resolved (which iwd defaults to), punching this security policy 
exception is not needed and arguably it should not be enabled by default.

Perhaps as a compromise we may be able to ship service.in with these lines added 
& commented out.  Not sure if this would be of any help though.  Other ideas are 
welcome.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iwd doesn't work with openresolv
  2022-01-03 19:05 iwd doesn't work with openresolv Denis Kenzior
@ 2026-02-28 15:34 ` Diederik de Haas
  0 siblings, 0 replies; 3+ messages in thread
From: Diederik de Haas @ 2026-02-28 15:34 UTC (permalink / raw)
  To: Denis Kenzior, iwd at lists.linux.dev

On Mon Jan 3, 2022 at 8:05 PM CET,  wrote:
>> [Service]
>> ReadWritePaths=/etc/resolv.conf.bak
>> ReadWritePaths=/etc/resolv.conf
>> 
>> Others suggested another way to fix it:
>> 
>> RuntimeDirectory=resolvconf
>> ReadWritePaths=/etc/resolv.conf
>> 
>> https://bugs.archlinux.org/task/67069
>> 
>> Can src/iwd.service.in be adjusted?
>
> I think this or a similar issue has come up before.  The problem is that iwd 
> supports either systemd-resolved or resolvconf.  So for systems that use 
> systemd-resolved (which iwd defaults to), punching this security policy 
> exception is not needed and arguably it should not be enabled by default.
>
> Perhaps as a compromise we may be able to ship service.in with these lines added 
> & commented out.  Not sure if this would be of any help though.  Other ideas are 
> welcome.

FWIW, this issue has come up again, but now in the Debian bug tracker:
https://bugs.debian.org/1129196

And Debian's iwd package version 3.11-2 added a patch to add the
ReadWritePaths to iwd.service.in.
https://tracker.debian.org/news/1723586/accepted-iwd-311-2-source-into-unstable/

I don't know what the best/correct solution is, but it seems helpful
that it's documented somewhere (service file, man page, etc) so that
different people don't run into the same issue again and again and have
to search for a solution to it.

Cheers,
  Diederik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-28 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-03 19:05 iwd doesn't work with openresolv Denis Kenzior
2026-02-28 15:34 ` Diederik de Haas
  -- strict thread matches above, loose matches on Subject: below --
2021-12-27 11:38 Yuri Kanivetsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox