]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolvconf: fixes for the compatibility interface
authorFilipe Brandenburger <filbranden@google.com>
Tue, 26 Jun 2018 01:07:48 +0000 (18:07 -0700)
committerFilipe Brandenburger <filbranden@google.com>
Wed, 27 Jun 2018 06:09:36 +0000 (23:09 -0700)
commit5a01b3f35d7b6182c78b6973db8d99bdabd4f9c3
tree9bb7b3ecb48cee06021230ae10599a92779c77e2
parentad4bc3352285f467f4ffa03c3171b19fa0a8758d
resolvconf: fixes for the compatibility interface

Also use compat_main() when called as `resolvconf`, since the interface
is closer to that of `systemd-resolve`.

Use a heap allocated string to set arg_ifname, since a stack allocated
one would be lost after the function returns. (This last one broke the
case where an interface name was suffixed with a dot, such as in
`resolvconf -a tap0.dhcp`.)

Tested:
  $ build/resolvconf -a nonexistent.abc </etc/resolv.conf
  Unknown interface 'nonexistent': No such device

Fixes #9423.
src/resolve/resolvconf-compat.c
src/resolve/resolvectl.c