From f7cfc57d1697408b13251f8c14f4cfdb229b789da62f4bca5cb05c3d2ea7dd38 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 13 Aug 2015 09:20:17 +0000 Subject: [PATCH] Accepting request 322300 from home:namtrac:branches:network:vpn OBS-URL: https://build.opensuse.org/request/show/322300 OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=96 --- openvpn.changes | 7 +++++++ openvpn.spec | 2 ++ revert-daemonize.patch | 17 +++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 revert-daemonize.patch diff --git a/openvpn.changes b/openvpn.changes index 4d9cf8c..7867549 100644 --- a/openvpn.changes +++ b/openvpn.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 13 08:29:35 UTC 2015 - idonmez@suse.com + +- Add revert-daemonize.patch, looks like under systemd the stdin + and stdout are not TTYs by default. This reverts to previous + behaviour fixing bsc#941569 + ------------------------------------------------------------------- Wed Aug 5 12:03:33 UTC 2015 - idonmez@suse.com diff --git a/openvpn.spec b/openvpn.spec index 87bb446..6e10b0c 100644 --- a/openvpn.spec +++ b/openvpn.spec @@ -52,6 +52,7 @@ Source11: rc%{name} Patch1: %{name}-2.3-plugin-man.dif Patch5: %{name}-2.3.0-man-dot.diff Patch6: %{name}-fips140-2.3.2.patch +Patch7: revert-daemonize.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gpg-offline BuildRequires: iproute2 @@ -129,6 +130,7 @@ chroot directives. %patch1 -p0 %patch5 -p0 %patch6 -p1 +%patch7 -p1 sed -e "s|\" __DATE__|$(date '+%b %e %Y' -r version.m4)\"|g" \ -i src/openvpn/options.c sed -e "s|@PLUGIN_LIBDIR@|%{_libdir}/openvpn/plugins|g" \ diff --git a/revert-daemonize.patch b/revert-daemonize.patch new file mode 100644 index 0000000..ea3405b --- /dev/null +++ b/revert-daemonize.patch @@ -0,0 +1,17 @@ +Index: openvpn-2.3.8/src/openvpn/misc.c +=================================================================== +--- openvpn-2.3.8.orig/src/openvpn/misc.c ++++ openvpn-2.3.8/src/openvpn/misc.c +@@ -1088,12 +1088,6 @@ get_user_pass_cr (struct user_pass *up, + */ + else if (from_stdin) + { +-#ifndef WIN32 +- /* did we --daemon'ize before asking for passwords? */ +- if ( !isatty(0) && !isatty(2) ) +- { msg(M_FATAL, "neither stdin nor stderr are a tty device, can't ask for %s password. If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache.", prefix ); } +-#endif +- + #ifdef ENABLE_CLIENT_CR + if (auth_challenge && (flags & GET_USER_PASS_DYNAMIC_CHALLENGE)) + {