[Openvpn-devel] Daemon as non-root, high priority
I would like to put together a patch that will allow the openvpn daemon to run with elevated priority as a non-root user. This currently doesn't work, because the daemon changes its UID before it renices itself. Questions: * Are there any "philosophical" objections to this that would prevent such a patch from being accepted? * Any gotchas? From my brief look at openvpn.c, it seems pretty simple. Thanks! -- ============ Ian Pilcheri.pilc...@comcast.net
[Openvpn-devel] nice() return value is unreliable
Attached is a small patch to set_nice() in misc.c that uses errno, rather than nice()'s return value to determine if the call succeeded. See 'man 2 nice' on a recent Linux distribution for why checking the return value is unreliable. -- ============ Ian Pilcheri.pilc...@comcast.net diff -urNp ../openvpn-1.5.0-orig/misc.c ./misc.c --- ../openvpn-1.5.0-orig/misc.c2004-02-09 11:38:59.0 -0600 +++ ./misc.c2004-02-09 12:25:08.0 -0600 @@ -139,7 +139,9 @@ set_nice (int niceval) if (niceval) { #ifdef HAVE_NICE - if (nice (niceval) < 0) + errno = 0; + nice (niceval); + if (errno != 0) msg (M_WARN | M_ERRNO, "WARNING: nice %d failed", niceval); else msg (M_INFO, "nice %d succeeded", niceval);
[Openvpn-devel] Add RPM build option to disable LZO
The attached patch to the OpenVPN 1.6.0 SPEC file adds a conditional build option to disable the use of LZO compression. LZO is not included in Red Hat/Fedora Core, so this will make it easier for users of those distributions to build a RPM without LZO support (if they don't want it). The package can be built with 'rpmbuild -tb --without lzo ...". -- ============ Ian Pilcheri.pilc...@comcast.net --- openvpn.spec-orig 2004-05-27 10:04:09.561878264 -0500 +++ openvpn.spec 2004-05-27 10:15:37.344319440 -0500 @@ -11,6 +11,9 @@ Packager: bishop clark (LC957) BuildRoot: %{_tmppath}/%{name}-%(id -un) +%{!?_without_lzo:BuildRequires: lzo-devel} +%{!?_without_lzo:Requires: lzo} + %description OpenVPN is a robust and highly flexible tunneling application that uses all of the encryption, authentication, and certification features @@ -24,7 +27,7 @@ %setup -q %build -%configure --enable-pthread +%configure --enable-pthread %{?_without_lzo:--disable-lzo} %__make %install