]> 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)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 27 Jun 2018 03:34:47 +0000 (12:34 +0900)
commit654457e560c5723b90b419f7651b87040aade07e
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