Red Hat Bugzilla – Bug 1313747
ipsec pluto returns zero even if it fails
Last modified: 2016-11-03 17:22:56 EDT
The same behaviour on rhel-7. libreswan-3.15-5.el7_1 +++ This bug was initially created as a clone of Bug #1313709 +++ Description of problem: ipsec pluto command returns zero even if it fails and prints nothing to the output. Version-Release number of selected component (if applicable): libreswan-3.15-5.1.el6 How reproducible: 100% Steps to Reproduce: 1. Install libreswan package and make sure, there is no db files in /etc.ipsec.d. It is true for fresh installation of libreswan, before service ipsec start command is run. 2. Run ipsec pluto command. # yum install -y libreswan ... # ls /etc/ipsec.d/ policies v6neighbor-hole.conf # ipsec pluto # echo $? 0 # ps -fA|grep pluto root 20056 17761 0 04:34 pts/0 00:00:00 grep pluto # grep pluto /var/log/secure Mar 2 04:33:38 unused-4-151 pluto[20028]: NSS DB directory: sql:/etc/ipsec.d Mar 2 04:33:38 unused-4-151 pluto[20028]: NSS readonly initialization ("sql:/etc/ipsec.d") failed (err -8174) Mar 2 04:33:38 unused-4-151 pluto[20028]: FATAL: NSS initialization failure Actual results: ipsec returns zero and prints nothing to the output. Expected results: ipsec returns non-zero and prints something useful to the output. Additional info: --- Additional comment from Jaroslav Aster on 2016-03-02 04:53:53 EST --- It seems that openswan has a different behaviour than libreswan. # rpm -q openswan openswan-2.6.32-37.el6.x86_64 # killall pluto # ps -fA|grep pluto root 20479 20206 0 04:48 pts/0 00:00:00 grep pluto # rm -f /etc/ipsec.d/*.db # ls /etc/ipsec.d/ policies # ipsec pluto # echo $? 0 # ls /etc/ipsec.d/ cert8.db key3.db policies secmod.db # ps -fA|grep pluto root 20501 1 0 04:48 ? 00:00:00 /usr/libexec/ipsec/pluto root 20504 20501 0 04:48 ? 00:00:00 _pluto_adns root 20507 20206 0 04:48 pts/0 00:00:00 grep pluto
See https://bugzilla.redhat.com/show_bug.cgi?id=1313709#c5.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2603.html