mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
g10: Fix a race condition initially creating trustdb.
* g10/tdbio.c (take_write_lock, tdbio_set_dbname): Fix message.
This commit is contained in:
parent
6f992d94ea
commit
ae38cbbca4
@ -100,12 +100,12 @@ take_write_lock (void)
|
|||||||
if (!lockhandle)
|
if (!lockhandle)
|
||||||
lockhandle = dotlock_create (db_name, 0);
|
lockhandle = dotlock_create (db_name, 0);
|
||||||
if (!lockhandle)
|
if (!lockhandle)
|
||||||
log_fatal ( _("can't create lock for '%s'\n"), db_name );
|
log_fatal ( _("can't create lock for `%s'\n"), db_name );
|
||||||
|
|
||||||
if (!is_locked)
|
if (!is_locked)
|
||||||
{
|
{
|
||||||
if (dotlock_take (lockhandle, -1) )
|
if (dotlock_take (lockhandle, -1) )
|
||||||
log_fatal ( _("can't lock '%s'\n"), db_name );
|
log_fatal ( _("can't lock `%s'\n"), db_name );
|
||||||
else
|
else
|
||||||
is_locked = 1;
|
is_locked = 1;
|
||||||
return 0;
|
return 0;
|
||||||
@ -517,7 +517,7 @@ tdbio_set_dbname( const char *new_dbname, int create, int *r_nofile)
|
|||||||
|
|
||||||
if( access( fname, R_OK ) ) {
|
if( access( fname, R_OK ) ) {
|
||||||
if( errno != ENOENT )
|
if( errno != ENOENT )
|
||||||
log_fatal( _("can't access '%s': %s\n"), fname, strerror(errno) );
|
log_fatal( _("can't access `%s': %s\n"), fname, strerror(errno) );
|
||||||
|
|
||||||
if (!create)
|
if (!create)
|
||||||
*r_nofile = 1;
|
*r_nofile = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user