~ubuntu-branches/ubuntu/jaunty/gnupg2/jaunty-security

« back to all changes in this revision

Viewing changes to checks/mkdemodirs

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
set -e
4
 
 
5
 
GPG="../g10/gpg --batch --quiet --no-secmem-warning --allow-secret-key-import"
6
 
NAMES='Alpha Bravo Charlie Delta Echo Foxtrot Golf Hotel India
7
 
       Juliet Kilo Lima Mike November Oscar Papa Quebec Romeo
8
 
       Sierra Tango Uniform Victor Whisky XRay Yankee Zulu'
9
 
 
10
 
if [ "$1" = "--clean" ]; then
11
 
    (for i in $NAMES; do
12
 
        [ -d $i ] && rm -r $i
13
 
    done) || true
14
 
    exit 0
15
 
fi
16
 
 
17
 
$GPG --dearmor -o secdemo.gpg --yes ../checks/secdemo.asc
18
 
$GPG --dearmor -o pubdemo.gpg --yes ../checks/pubdemo.asc
19
 
[ -f ./tdb.tmp ] && rm ./tdb.tmp
20
 
GPGDEMO="$GPG --homedir . --trustdb-name ./tdb.tmp --no-default-keyring
21
 
         --keyring pubdemo.gpg --secret-keyring secdemo.gpg"
22
 
echo -n "Creating:"
23
 
for name in $NAMES; do
24
 
    echo -n " $name"
25
 
    [ -d $name ] && rm -r $name
26
 
    mkdir $name
27
 
    $GPGDEMO --export-secret-key -o - $name > $name/Secret.gpg
28
 
    $GPG --homedir $name --import $name/Secret.gpg
29
 
    $GPGDEMO --export -o - $name > $name/Public.gpg
30
 
    $GPG --homedir $name --import $name/Public.gpg
31
 
    [ -f $name/pubring.gpg~ ] && rm $name/pubring.gpg~
32
 
done
33
 
echo "."
34
 
[ -f ./tdb.tmp ] && rm ./tdb.tmp
35
 
rm pubdemo.gpg secdemo.gpg
36
 
 
37