/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to debian/mandos-client.postrm

  • Committer: Teddy Hogeborn
  • Date: 2019-08-03 12:27:14 UTC
  • Revision ID: teddy@recompile.se-20190803122714-efudxsyomr1k0zbt
dracut-module/password-agent.c: Use O_NOCTTY

Whenever a file is opened using open(), use the O_NOCTTY flag, just to
be safe.

* dracut-module/password-agent.c (test_start_mandos_client_execv): Use
  O_NOCTTY.
  (test_wait_for_mandos_client_exit_failure): - '' -
  (test_wait_for_mandos_client_exit_killed): - '' -
  (test_read_mandos_client_output_readerror): - '' -
  (test_read_inotify_event_readerror): - '' -
  (test_connect_question_socket_bad_epoll): - '' -
  (test_send_password_to_socket_bad_epoll): - '' -
  (assert_add_existing_questions_to_devnull): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# This script can be called in the following ways:
 
3
#
 
4
# After the package was removed:
 
5
#       <postrm> remove
 
6
#
 
7
# After the package was purged:
 
8
#       <postrm> purge
 
9
#
 
10
# After the package was upgraded:
 
11
#       <old-postrm> upgrade <new-version>
 
12
# if that fails:
 
13
#       <new-postrm> failed-upgrade <old-version>
 
14
#
 
15
#
 
16
# After all of the packages files have been replaced:
 
17
#       <postrm> disappear <overwriting-package> <version>
 
18
#
 
19
#
 
20
# If preinst fails during install:
 
21
#       <new-postrm> abort-install
 
22
#
 
23
# If preinst fails during upgrade of removed package:
 
24
#       <new-postrm> abort-install <old-version>
 
25
#
 
26
# If preinst fails during upgrade:
 
27
#       <new-postrm> abort-upgrade <old-version>
 
28
 
 
29
set -e
 
30
 
 
31
# Update the initial RAM file system image
 
32
update_initramfs()
 
33
{
 
34
    update-initramfs -u -k all || :
 
35
}
 
36
 
 
37
case "$1" in
 
38
    remove)
 
39
        update_initramfs
 
40
        ;;
 
41
 
 
42
    purge)
 
43
        shred --remove /etc/keys/mandos/seckey.txt 2>/dev/null || :
 
44
        rm --force /etc/mandos/plugin-runner.conf \
 
45
            /etc/keys/mandos/pubkey.txt \
 
46
            /etc/keys/mandos/seckey.txt \
 
47
            /etc/keys/mandos/tls-privkey.pem \
 
48
            /etc/keys/mandos/tls-pubkey.pem \
 
49
            /etc/keys/mandos/dhparams.pem 2>/dev/null
 
50
        update_initramfs
 
51
        ;;
 
52
    upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
 
53
        ;;
 
54
 
 
55
    *)
 
56
        echo "$0 called with unknown argument '$1'" 1>&2
 
57
        exit 1
 
58
        ;;
 
59
esac
 
60
 
 
61
#DEBHELPER#
 
62
 
 
63
exit 0