mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-28 15:57:03 +01:00
* keydb.h, getkey.c (get_user_id_native), import.c (import_one): Display
user ID while importing a key. Note this applies to both --import and keyserver --recv-keys. * exec.c (exec_finish): Log unnatural exit (core dump, killed manually, etc) for fork/exec/pipe child processes.
This commit is contained in:
parent
fc0d796503
commit
3bff7c1d60
@ -1,3 +1,12 @@
|
|||||||
|
2002-06-09 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keydb.h, getkey.c (get_user_id_native), import.c (import_one):
|
||||||
|
Display user ID while importing a key. Note this applies to both
|
||||||
|
--import and keyserver --recv-keys.
|
||||||
|
|
||||||
|
* exec.c (exec_finish): Log unnatural exit (core dump, killed
|
||||||
|
manually, etc) for fork/exec/pipe child processes.
|
||||||
|
|
||||||
2002-06-08 Timo Schulz <ts@winpt.org>
|
2002-06-08 Timo Schulz <ts@winpt.org>
|
||||||
|
|
||||||
* encode.c (encode_symmetric): Disable the compat flag
|
* encode.c (encode_symmetric): Disable the compat flag
|
||||||
|
@ -394,6 +394,8 @@ int exec_write(struct exec_info **info,const char *program,
|
|||||||
args_in==NULL?program:shell,
|
args_in==NULL?program:shell,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
||||||
|
/* This mimics the POSIX sh behavior - 127 means "not found"
|
||||||
|
from the shell. */
|
||||||
if(errno==ENOENT)
|
if(errno==ENOENT)
|
||||||
_exit(127);
|
_exit(127);
|
||||||
|
|
||||||
@ -537,7 +539,10 @@ int exec_finish(struct exec_info *info)
|
|||||||
WIFEXITED(info->progreturn))
|
WIFEXITED(info->progreturn))
|
||||||
ret=WEXITSTATUS(info->progreturn);
|
ret=WEXITSTATUS(info->progreturn);
|
||||||
else
|
else
|
||||||
ret=127;
|
{
|
||||||
|
log_error(_("unnatural exit of external program\n"));
|
||||||
|
ret=127;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
12
g10/getkey.c
12
g10/getkey.c
@ -2383,6 +2383,18 @@ get_user_id( u32 *keyid, size_t *rn )
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char*
|
||||||
|
get_user_id_native( u32 *keyid )
|
||||||
|
{
|
||||||
|
size_t rn;
|
||||||
|
|
||||||
|
char *p = get_user_id( keyid, &rn );
|
||||||
|
char *p2 = utf8_to_native( p, rn, 0 );
|
||||||
|
|
||||||
|
m_free(p);
|
||||||
|
return p2;
|
||||||
|
}
|
||||||
|
|
||||||
KEYDB_HANDLE
|
KEYDB_HANDLE
|
||||||
get_ctx_handle(GETKEY_CTX ctx)
|
get_ctx_handle(GETKEY_CTX ctx)
|
||||||
{
|
{
|
||||||
|
42
g10/import.c
42
g10/import.c
@ -501,8 +501,12 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
keydb_release (hd);
|
keydb_release (hd);
|
||||||
|
|
||||||
/* we are ready */
|
/* we are ready */
|
||||||
if( !opt.quiet )
|
if( !opt.quiet ) {
|
||||||
log_info( _("key %08lX: public key imported\n"), (ulong)keyid[1]);
|
char *p=get_user_id_native(keyid);
|
||||||
|
log_info( _("key %08lX: public key \"%s\" imported\n"),
|
||||||
|
(ulong)keyid[1],p);
|
||||||
|
m_free(p);
|
||||||
|
}
|
||||||
if( is_status_enabled() ) {
|
if( is_status_enabled() ) {
|
||||||
char *us = get_long_user_id_string( keyid );
|
char *us = get_long_user_id_string( keyid );
|
||||||
write_status_text( STATUS_IMPORTED, us );
|
write_status_text( STATUS_IMPORTED, us );
|
||||||
@ -573,24 +577,26 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
|
|
||||||
/* we are ready */
|
/* we are ready */
|
||||||
if( !opt.quiet ) {
|
if( !opt.quiet ) {
|
||||||
|
char *p=get_user_id_native(keyid);
|
||||||
if( n_uids == 1 )
|
if( n_uids == 1 )
|
||||||
log_info( _("key %08lX: 1 new user ID\n"),
|
log_info( _("key %08lX: \"%s\" 1 new user ID\n"),
|
||||||
(ulong)keyid[1]);
|
(ulong)keyid[1], p);
|
||||||
else if( n_uids )
|
else if( n_uids )
|
||||||
log_info( _("key %08lX: %d new user IDs\n"),
|
log_info( _("key %08lX: \"%s\" %d new user IDs\n"),
|
||||||
(ulong)keyid[1], n_uids );
|
(ulong)keyid[1], p, n_uids );
|
||||||
if( n_sigs == 1 )
|
if( n_sigs == 1 )
|
||||||
log_info( _("key %08lX: 1 new signature\n"),
|
log_info( _("key %08lX: \"%s\" 1 new signature\n"),
|
||||||
(ulong)keyid[1]);
|
(ulong)keyid[1], p);
|
||||||
else if( n_sigs )
|
else if( n_sigs )
|
||||||
log_info( _("key %08lX: %d new signatures\n"),
|
log_info( _("key %08lX: \"%s\" %d new signatures\n"),
|
||||||
(ulong)keyid[1], n_sigs );
|
(ulong)keyid[1], p, n_sigs );
|
||||||
if( n_subk == 1 )
|
if( n_subk == 1 )
|
||||||
log_info( _("key %08lX: 1 new subkey\n"),
|
log_info( _("key %08lX: \"%s\" 1 new subkey\n"),
|
||||||
(ulong)keyid[1]);
|
(ulong)keyid[1], p);
|
||||||
else if( n_subk )
|
else if( n_subk )
|
||||||
log_info( _("key %08lX: %d new subkeys\n"),
|
log_info( _("key %08lX: \"%s\" %d new subkeys\n"),
|
||||||
(ulong)keyid[1], n_subk );
|
(ulong)keyid[1], p, n_subk );
|
||||||
|
m_free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
stats->n_uids +=n_uids;
|
stats->n_uids +=n_uids;
|
||||||
@ -598,8 +604,12 @@ import_one( const char *fname, KBNODE keyblock, int fast,
|
|||||||
stats->n_subk +=n_subk;
|
stats->n_subk +=n_subk;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if( !opt.quiet )
|
if( !opt.quiet ) {
|
||||||
log_info( _("key %08lX: not changed\n"), (ulong)keyid[1] );
|
char *p=get_user_id_native(keyid);
|
||||||
|
log_info( _("key %08lX: \"%s\" not changed\n"),
|
||||||
|
(ulong)keyid[1],p);
|
||||||
|
m_free(p);
|
||||||
|
}
|
||||||
stats->unchanged++;
|
stats->unchanged++;
|
||||||
}
|
}
|
||||||
keydb_release (hd); hd = NULL;
|
keydb_release (hd); hd = NULL;
|
||||||
|
@ -217,6 +217,7 @@ char*get_user_id_string( u32 *keyid );
|
|||||||
char*get_user_id_string_native( u32 *keyid );
|
char*get_user_id_string_native( u32 *keyid );
|
||||||
char*get_long_user_id_string( u32 *keyid );
|
char*get_long_user_id_string( u32 *keyid );
|
||||||
char*get_user_id( u32 *keyid, size_t *rn );
|
char*get_user_id( u32 *keyid, size_t *rn );
|
||||||
|
char*get_user_id_native( u32 *keyid );
|
||||||
KEYDB_HANDLE get_ctx_handle(GETKEY_CTX ctx);
|
KEYDB_HANDLE get_ctx_handle(GETKEY_CTX ctx);
|
||||||
|
|
||||||
/*-- keyid.c --*/
|
/*-- keyid.c --*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user