mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
Fix bug 1146
This commit is contained in:
parent
ad27e8f41b
commit
5f4595a529
@ -1,3 +1,7 @@
|
|||||||
|
2009-12-18 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* applygnupgdefaults (errorfile): Use mktemp. Fixes bug#1146.
|
||||||
|
|
||||||
2009-12-08 Marcus Brinkmann <marcus@g10code.de>
|
2009-12-08 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* gpg-connect-agent.c (main): Convert posix fd to assuan fd.
|
* gpg-connect-agent.c (main): Convert posix fd to assuan fd.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Apply defaults from/etc/gnupg/gpg.conf to all users -*- sh -*-
|
# Apply defaults from /etc/gnupg/gpg.conf to all users -*- sh -*-
|
||||||
#
|
#
|
||||||
# Copyright 2007 Free Software Foundation, Inc.
|
# Copyright 2007 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
@ -16,7 +16,7 @@ errorfile=
|
|||||||
|
|
||||||
error () {
|
error () {
|
||||||
echo "$PGM: $*" >&2
|
echo "$PGM: $*" >&2
|
||||||
echo "$PGM: $*" >>$errorfile
|
[ -n "$errorfile" ] && echo "$PGM: $*" >>$errorfile
|
||||||
}
|
}
|
||||||
|
|
||||||
info () {
|
info () {
|
||||||
@ -34,9 +34,8 @@ cleanup ()
|
|||||||
[ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile"
|
[ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT SIGINT SIGHUP SIGPIPE
|
trap cleanup EXIT SIGINT SIGHUP SIGPIPE
|
||||||
errorfile="/tmp/$PGM.$$.log"
|
errorfile=$(mktemp "/tmp/$PGM.log.XXXXXX")
|
||||||
: >$errorfile
|
[ -n "$errorfile" -a -f "$errorfile" ] || exit 2
|
||||||
|
|
||||||
|
|
||||||
# Check whether we can use getent
|
# Check whether we can use getent
|
||||||
if getent --help </dev/null >/dev/null 2>&1 ; then
|
if getent --help </dev/null >/dev/null 2>&1 ; then
|
||||||
@ -62,7 +61,7 @@ fi
|
|||||||
|
|
||||||
${cat_passwd} \
|
${cat_passwd} \
|
||||||
| while IFS=: read -r user dmy_a uid dmy_c dmy_d home shell dmy_rest; do
|
| while IFS=: read -r user dmy_a uid dmy_c dmy_d home shell dmy_rest; do
|
||||||
# Process only entires with a valid login shell
|
# Process only entries with a valid login shell
|
||||||
grep </etc/shells "^$shell" 2>/dev/null >/dev/null || continue
|
grep </etc/shells "^$shell" 2>/dev/null >/dev/null || continue
|
||||||
# and with an existant gnupg home directory
|
# and with an existant gnupg home directory
|
||||||
[ -d "$home/.gnupg" ] || continue
|
[ -d "$home/.gnupg" ] || continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user