Am 09.09.20 um 17:37 schrieb Gert Doering: > Our code works on "very old Linux" (Fedora-1), but needs a #define > for TUNSETGROUP to compile. Everything else is there. > > While at it, fix TUNSETGROUP error message. > > Reported-By: noloader on Trac > Trac: #1152 > > Signed-off-by: Gert Doering <g...@greenie.muc.de> > --- > src/openvpn/tun.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > index 923131ad..651cb871 100644 > --- a/src/openvpn/tun.c > +++ b/src/openvpn/tun.c > @@ -1993,6 +1993,11 @@ open_tun(const char *dev, const char *dev_type, const > char *dev_node, struct tun > > #ifdef ENABLE_FEATURE_TUN_PERSIST > > +/* TUNSETGROUP appeared in 2.6.23 */ > +#ifndef TUNSETGROUP > +# define TUNSETGROUP _IOW('T', 206, int) > +#endif > + > void > tuncfg(const char *dev, const char *dev_type, const char *dev_node, > int persist_mode, const char *username, const char *groupname, > @@ -2032,7 +2037,7 @@ tuncfg(const char *dev, const char *dev_type, const > char *dev_node, > } > else if (ioctl(tt->fd, TUNSETGROUP, platform_state_group.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, ctx); >
Hm, it does not hurt, so... Acked-By: Arne Schwabe <a...@rfc2549.org>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel