diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 8381cf3..d453aea 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,7 +1,10 @@
 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
+	 
 2004-05-09 Paul Jakma <paul@dishone.st>
 
 	* zserv.c: (zsend_route_multipath) Set the nexthop_num
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index b07580c..9441abe 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 @@
 
   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 @@
   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 (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)
         {
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index 2fdffc6..805a9ca 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -27,10 +27,12 @@
 #include "prefix.h"
 #include "ioctl.h"
 #include "log.h"
+#include "privs.h"
 
 #include "zebra/rib.h"
 #include "zebra/rt.h"
 
+extern struct zebra_privs_t zserv_privs;
 
 /* clear and set interface name string */
 void
@@ -130,18 +132,12 @@
 
   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, SIOCGLIFMETRIC, (caddr_t) & lifreq);
   else if (ifp->flags & IFF_IPV6)
     ret = AF_IOCTL (AF_INET6, SIOCGLIFMETRIC, (caddr_t) & lifreq);
   else
     ret = -1;
-
-  if (zserv_privs.change(ZPRIVS_LOWER))
-    zlog (NULL, LOG_ERR, "Can't lower privileges");
     
   if (ret < 0)
     return;
@@ -159,9 +155,6 @@
   struct lifreq lifreq;
   int ret;
   
-  if (zserv_privs.change(ZPRIVS_RAISE))
-    zlog (NULL, LOG_ERR, "Can't raise privileges");
-  
   if (ifp->flags & IFF_IPV4)
     {
       lifreq_set_name (&lifreq, ifp);
@@ -180,7 +173,6 @@
 
 
   if ((ifp->flags & IFF_IPV6) == 0)
-    goto out;
 
   lifreq_set_name (&lifreq, ifp);
   ret = AF_IOCTL (AF_INET6, SIOCGLIFMTU, (caddr_t) & lifreq);
@@ -193,10 +185,6 @@
     {
       ifp->mtu6 = lifreq.lifr_metric;
     }
-
-out:
-   if (zserv_privs.change(ZPRIVS_LOWER))
-     zlog (NULL, LOG_ERR, "Can't lower privileges");
 }
 
 /* Set up interface's address, netmask (and broadcast? ).
@@ -241,7 +229,7 @@
       memcpy (&ifreq.ifr_broadaddr, &broad, sizeof (struct sockaddr_in));
       ret = if_ioctl (SIOCSIFBRDADDR, (caddr_t) & ifreq);
       if (ret < 0)
-        goto out;
+        return ret;
     }
 
   mask.sin_family = p->family;
@@ -249,7 +237,7 @@
   memcpy (&mask, &ifreq.ifr_addr, sizeof (mask));
 #else
   memcpy (&ifreq.ifr_netmask, &mask, sizeof (struct sockaddr_in));
-#endif /* SUNOS5 */
+#endif /* SUNOS_5 */
   ret = if_ioctl (SIOCSIFNETMASK, (caddr_t) & ifreq);
 
   return ((ret < 0) ? ret : 0);
@@ -293,13 +281,7 @@
     {
       lifreq_set_name (&lifreq, ifp);
       
-      if (zserv_privs.change(ZPRIVS_RAISE))
-        zlog (NULL, LOG_ERR, "Can't raise privileges");
-      
       ret = AF_IOCTL (AF_INET, SIOCGLIFFLAGS, (caddr_t) & lifreq);
-      
-      if (zserv_privs.change(ZPRIVS_LOWER))
-        zlog (NULL, LOG_ERR, "Can't lower privileges");
 
       flags4 = (lifreq.lifr_flags & 0xffffffff);
       if (!(flags4 & IFF_UP))
@@ -310,13 +292,7 @@
     {
       lifreq_set_name (&lifreq, ifp);
       
-      if (zserv_privs.change(ZPRIVS_RAISE))
-        zlog (NULL, LOG_ERR, "Can't raise privileges");      
-      
       ret = AF_IOCTL (AF_INET6, SIOCGLIFFLAGS, (caddr_t) & lifreq);
-      
-      if (zserv_privs.change(ZPRIVS_LOWER))
-        zlog (NULL, LOG_ERR, "Can't lower privileges");
               
       flags6 = (lifreq.lifr_flags & 0xffffffff);
       if (!(flags6 & IFF_UP))
@@ -338,9 +314,6 @@
   lifreq.lifr_flags = ifp->flags;
   lifreq.lifr_flags |= flags;
 
-  if (zserv_privs.change(ZPRIVS_RAISE))
-    zlog (NULL, LOG_ERR, "Can't raise privileges");
-
   if (ifp->flags & IFF_IPV4)
     ret = AF_IOCTL (AF_INET, SIOCSLIFFLAGS, (caddr_t) & lifreq);
   else if (ifp->flags & IFF_IPV6)
@@ -353,9 +326,8 @@
                strerror (errno));
   else
     ret = 0;
-
-  if (zserv_privs.change(ZPRIVS_LOWER))
-    zlog (NULL, LOG_ERR, "Can't lower privileges");
+    
+  return ret;
 }
 
 /* Unset interface's flag. */
@@ -370,9 +342,6 @@
   lifreq.lifr_flags = ifp->flags;
   lifreq.lifr_flags &= ~flags;
 
-  if (zserv_privs.change(ZPRIVS_RAISE))
-    zlog (NULL, LOG_ERR, "Can't raise privileges");
-
   if (ifp->flags & IFF_IPV4)
     ret = AF_IOCTL (AF_INET, SIOCSLIFFLAGS, (caddr_t) & lifreq);
   else if (ifp->flags & IFF_IPV6)
@@ -385,8 +354,7 @@
   else
     ret = 0;
   
-  if (zserv_privs.change(ZPRIVS_LOWER))
-    zlog (NULL, LOG_ERR, "Can't lower privileges");
+  return ret;
 }
 
 #ifdef HAVE_IPV6
