Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1313747 - ipsec pluto returns zero even if it fails
ipsec pluto returns zero even if it fails
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libreswan (Show other bugs)
7.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Paul Wouters
Jaroslav Aster
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-02 04:58 EST by Jaroslav Aster
Modified: 2016-11-03 17:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Cause: pluto daemon did not always return proper error code on failure to start Consequence: a process starting pluto would not realise if something had gone wrong Fix: return proper error code Result: calling processes now know when pluto failed to start and can take appropriate action
Story Points: ---
Clone Of: 1313709
Environment:
Last Closed: 2016-11-03 17:22:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2603 normal SHIPPED_LIVE Moderate: libreswan security and bug fix update 2016-11-03 08:13:02 EDT

  None (edit)
Description Jaroslav Aster 2016-03-02 04:58:16 EST
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
Comment 1 Jaroslav Aster 2016-04-28 12:03:21 EDT
See https://bugzilla.redhat.com/show_bug.cgi?id=1313709#c5.
Comment 5 errata-xmlrpc 2016-11-03 17:22:56 EDT
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

Note You need to log in before you can comment on or make changes to this bug.