Hi,
batctl has a "root" user check since the beginning of this tool. It even got a TODO comment in 58525b8330e9 ("batctl: adjust vis.c coding style"):
/* TODO: remove this generic check here and move it into the individual functions */
This patchset is now trying to resolve this TODO.
* batctl: Move root privileges check in separate function * batctl: Use geteuid for checks of root privileges * batctl: Return type of error on netlink_get_info error * batctl: Make root privileges check function specific * batctl: Allow to retrieve interface stats as non-root * batctl: Allow to read loglevel as normal user * batctl: Allow to read gw_mode as normal user * batctl: Allow to read sysfs settings as normal user * batctl: Allow to read list of interfaces as normal user
"Return type of error on netlink_get_info error" may look a little bit odd in this list. But it was required in my initial test to avoid that "originators" and "gwl" try to start a debugfs access when the netlink function should have returned a "-EPERM" (but did return a -EOPNOTSUPP).
Kind regards, Sven