Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 515cf780b4c6387edbe99aea626115735ae230db Author: Sven Eckelmann sven@narfation.org Date: Sun Jan 22 13:21:13 2017 +0100
batctl: Allow to read list of interfaces as normal user
The list of interfaces attached to a batman-adv interface can be read by a normal user via rtnetlink or sysfs. Only modifying this list requires more acesss. Don't artificially restrict access to this information by the batctl sucommand.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
515cf780b4c6387edbe99aea626115735ae230db interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/interface.c b/interface.c index 01ee6fc..5a57be6 100644 --- a/interface.c +++ b/interface.c @@ -324,14 +324,14 @@ int interface(char *mesh_iface, int argc, char **argv) } }
- check_root_or_die("batctl interface"); - rest_argc = argc - optind; rest_argv = &argv[optind];
if (rest_argc == 0) return print_interfaces(mesh_iface);
+ check_root_or_die("batctl interface"); + if ((strcmp(rest_argv[0], "add") != 0) && (strcmp(rest_argv[0], "a") != 0) && (strcmp(rest_argv[0], "del") != 0) && (strcmp(rest_argv[0], "d") != 0) && (strcmp(rest_argv[0], "create") != 0) && (strcmp(rest_argv[0], "c") != 0) &&