/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: 2009-01-08 03:54:06 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090108035406-01uqkv9xqgxlnw7c
Change the default value of the "checker" option command to make the
checker command be run-time dependent on the "host" client attribute
instead of reading it only once on startup:

* clients.conf (checker): Changed default commented-out value to
                          "fping -q -- %%(host)s".
* mandos (main): Changed default value for the "checker" config option
                 to "fping -q -- %%(host)s".
* mandos-clients.conf.xml (OPTIONS): Document changed default value.
  (EXAMPLE): Changed value of "checker".

* plugins.d/password-prompt.c: Whitespace changes only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# Contact the authors at <mandos@fukt.bsnet.se>.
22
22
23
23
 
24
 
VERSION="1.0.12"
 
24
VERSION="1.0.3"
25
25
 
26
26
KEYDIR="/etc/keys/mandos"
27
27
KEYTYPE=DSA
147
147
        echo "Invalid key length" >&2
148
148
        exit 1
149
149
    fi
150
 
    
 
150
 
151
151
    if [ -z "$KEYEXPIRE" ]; then
152
152
        echo "Empty key expiration" >&2
153
153
        exit 1
172
172
    if [ -n "$KEYEMAIL" ]; then
173
173
        KEYEMAILLINE="Name-Email: $KEYEMAIL"
174
174
    fi
175
 
    
 
175
 
176
176
    # Create temporary gpg batch file
177
177
    BATCHFILE="`mktemp -t mandos-keygen-batch.XXXXXXXXXX`"
178
178
fi
284
284
        stty echo
285
285
        if [ "$first" != "$second" ]; then
286
286
            echo -e "Passphrase mismatch" >&2
287
 
            touch "$RINGDIR"/mismatch
 
287
            false
288
288
        else
289
289
            echo -n "$first"
290
290
        fi
292
292
        --homedir "$RINGDIR" --trust-model always --armor --encrypt \
293
293
        --sign --recipient "$FINGERPRINT" --comment "$FILECOMMENT" \
294
294
        > "$SECFILE"
295
 
    if [ -e "$RINGDIR"/mismatch ]; then
296
 
        rm --force "$RINGDIR"/mismatch
297
 
        exit 1
 
295
    status="${PIPESTATUS[0]}"
 
296
    if [ "$status" -ne 0 ]; then
 
297
        exit "$status"
298
298
    fi
299
299
    
300
300
    cat <<-EOF