1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
# rhbz#1313816
west #
mkdir /tmp/rhbz1313816
west #
rm -f /etc/ipsec.d/*.*
west #
# should abort, not crash, due to missing nss
west #
ipsec pluto --rundir /tmp/rhbz1313816 --nofork --stderrlog --log-no-time
Pluto initialized
Initializing NSS using read-write database "sql:/etc/ipsec.d"
FATAL ERROR: NSS: initialization using read-only database "sql:/etc/ipsec.d" failed: SEC_ERROR 18 (0x12): security library: bad database.
west #
#
west #
# rhbz#1041576 start pluto in dir not owned by root
west #
# should not fail with "pluto: unable to create lock dir:"
west #
# not using /tmp or /var/tmp/ due to specialness of parent dir in test
west #
/testing/guestbin/swan-prep
west #
rm -rf /var/cache/otheruser
west #
mkdir -p /var/cache/otheruser/var/run/pluto /var/cache/otheruser/etc
west #
cp /etc/ipsec.d/*.* /var/cache/otheruser/etc/
west #
mv /etc/ipsec.conf /var/cache/otheruser/etc/
west #
chown -R bin.bin /var/cache/otheruser/var/run/pluto /var/cache/otheruser/etc
west #
chmod -R 755 /var/cache/otheruser
west #
ipsec pluto --rundir /var/cache/otheruser/var/run/pluto --secretsfile /var/cache/otheruser/etc/ipsec.secrets
west #
# give pluto time to start and create its socket and pid files
west #
sleep 3
west #
# show it is running
west #
ipsec whack --rundir /var/cache/otheruser/var/run/pluto --briefstatus
000 State Information: DDoS cookies not required, Accepting new IKE connections
000 IKE SAs: total(0), half-open(0), open(0), authenticated(0), anonymous(0)
000 IPsec SAs: total(0), authenticated(0), anonymous(0)
west #
# shut it down
west #
ipsec whack --rundir /var/cache/otheruser/var/run/pluto --shutdown
west #
echo "initdone"
initdone
west #
|