/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 mandos-keygen

  • Committer: Teddy Hogeborn
  • Date: 2014-06-14 23:43:07 UTC
  • Revision ID: teddy@recompile.se-20140614234307-i0mh9r2n4orkqtki
plugin-runner: Release memory and close FD's correctly in all cases.

* plugins.d/mandos-client.c (main): Init "direntries" to NULL.  Close
                                    "dir_fd" at fallback label.  Do
                                    not free "direntries" if
                                    scandirat() or scandir() failed.
                                    Do free(direntries) at fallback
                                    label.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
3
3
# Mandos key generator - create a new OpenPGP key for a Mandos client
4
4
5
 
# Copyright © 2008-2013 Teddy Hogeborn
6
 
# Copyright © 2008-2013 Björn Påhlsson
 
5
# Copyright © 2008-2014 Teddy Hogeborn
 
6
# Copyright © 2008-2014 Björn Påhlsson
7
7
8
8
# This program is free software: you can redistribute it and/or modify
9
9
# it under the terms of the GNU General Public License as published by
21
21
# Contact the authors at <mandos@recompile.se>.
22
22
23
23
 
24
 
VERSION="1.6.3"
 
24
VERSION="1.6.5"
25
25
 
26
26
KEYDIR="/etc/keys/mandos"
27
27
KEYTYPE=RSA
228
228
        date
229
229
    fi
230
230
    
 
231
    # Make sure trustdb.gpg exists;
 
232
    # this is a workaround for Debian bug #737128
 
233
    gpg --quiet --batch --no-tty --no-options --enable-dsa2 \
 
234
        --homedir "$RINGDIR" \
 
235
        --import-ownertrust < /dev/null
231
236
    # Generate a new key in the key rings
232
237
    gpg --quiet --batch --no-tty --no-options --enable-dsa2 \
233
238
        --homedir "$RINGDIR" --trust-model always \