Hiyas,

currently openvpn prints that TUNSETOWNER failed if TUNSETGROUP failed. 
Attached patch fixes this.

Btw. it seems that the kernel shipped with CentOS does not support --group 
with --mktun, in case someone wants to document it somewhere.

Regards,
Till
diff -up openvpn-2.1_rc13/tun.c.tunsetgroup_errormessage openvpn-2.1_rc13/tun.c
--- openvpn-2.1_rc13/tun.c.tunsetgroup_errormessage	2008-10-12 23:40:24.548623210 +0200
+++ openvpn-2.1_rc13/tun.c	2008-10-12 23:40:31.964621830 +0200
@@ -1279,7 +1279,7 @@ tuncfg (const char *dev, const char *dev
         msg (M_ERR, "Cannot get group entry for %s", groupname);
       else
         if (ioctl (tt->fd, TUNSETGROUP, group_state.gr->gr_gid) < 0)
-          msg (M_ERR, "Cannot ioctl TUNSETOWNER(%s) %s", groupname, dev);
+          msg (M_ERR, "Cannot ioctl TUNSETGROUP(%s) %s", groupname, dev);
     }
   close_tun (tt);
   msg (M_INFO, "Persist state set to: %s", (persist_mode ? "ON" : "OFF"));

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to