diff options
Diffstat (limited to 'zebra/if_ioctl_solaris.c')
-rw-r--r-- | zebra/if_ioctl_solaris.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c index b07580c22..9441abed8 100644 --- a/zebra/if_ioctl_solaris.c +++ b/zebra/if_ioctl_solaris.c @@ -29,13 +29,14 @@ #include "connected.h" #include "memory.h" #include "log.h" +#include "privs.h" #include "zebra/interface.h" void lifreq_set_name (struct lifreq *, struct interface *); static int if_get_addr (struct interface *, struct sockaddr *); static void interface_info_ioctl (struct interface *); - +extern struct zebra_privs_t zserv_privs; int interface_list_ioctl (int af) @@ -161,9 +162,6 @@ if_get_index (struct interface *ifp) lifreq_set_name (&lifreq, ifp); - if (zserv_privs.change(ZPRIVS_RAISE)) - zlog (NULL, LOG_ERR, "Can't raise privileges"); - if (ifp->flags & IFF_IPV4) ret = AF_IOCTL (AF_INET, SIOCGLIFINDEX, (caddr_t) & lifreq); else if (ifp->flags & IFF_IPV6) @@ -171,9 +169,6 @@ if_get_index (struct interface *ifp) else ret = -1; - if (zserv_privs.change(ZPRIVS_LOWER)) - zlog (NULL, LOG_ERR, "Can't lower privileges"); - if (ret < 0) { zlog_warn ("SIOCGLIFINDEX(%s) failed", ifp->name); @@ -221,13 +216,7 @@ if_get_addr (struct interface *ifp, struct sockaddr *addr) if (ifp->flags & IFF_POINTOPOINT) { - if (zserv_privs.change(ZPRIVS_RAISE)) - zlog (NULL, LOG_ERR, "Can't raise privileges"); - ret = AF_IOCTL (af, SIOCGLIFDSTADDR, (caddr_t) & lifreq); - - if (zserv_privs.change(ZPRIVS_LOWER)) - zlog (NULL, LOG_ERR, "Can't lower privileges"); if (ret < 0) { |