diff options
author | paul <paul> | 2004-05-11 12:55:22 +0200 |
---|---|---|
committer | paul <paul> | 2004-05-11 12:55:22 +0200 |
commit | 48a46fa0c35f8f46e482ed1fef8b4bf63e413e0a (patch) | |
tree | bbc9032e718f6de580b87752e6cbb0a6a34a4359 /zebra/if_ioctl_solaris.c | |
parent | 2004-05-11 Paul Jakma <paul@dishone.st> (diff) | |
download | frr-48a46fa0c35f8f46e482ed1fef8b4bf63e413e0a.tar.xz frr-48a46fa0c35f8f46e482ed1fef8b4bf63e413e0a.zip |
2004-05-11 Paul Jakma <paul@dishone.st>
* Makefile.am: support for IOCTL_METHOD, as per Sowmini's patch.
* if_ioctl_solaris.c: Fixup some erroneous privilege changes and
add privs.h header.
* ioctl_solaris.c: ditto
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) { |