mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Some minor bug fixes.
do not prompt for revocation reason for v3 revocations (unless force-v4-certs is on) since they wouldn't be used anyway. show the status of the sigs (exportable? revocable?) to the user before prompting for which sig to revoke. Also, make sure that local signatures get local revocations. Add "exec-path" variable to override PATH for execing programs. properly check return code from classify_user_id to catch unclassifiable keys.
This commit is contained in:
parent
bbf4faae1a
commit
9267666d78
5 changed files with 64 additions and 17 deletions
19
g10/g10.c
19
g10/g10.c
|
@ -227,6 +227,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||
oKeyServer,
|
||||
oKeyServerOptions,
|
||||
oTempDir,
|
||||
oExecPath,
|
||||
oEncryptTo,
|
||||
oNoEncryptTo,
|
||||
oLoggerFD,
|
||||
|
@ -345,6 +346,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
N_("use the default key as default recipient")},
|
||||
{ oNoDefRecipient, "no-default-recipient", 0, "@" },
|
||||
{ oTempDir, "temp-directory", 2, "@" },
|
||||
{ oExecPath, "exec-path", 2, "@" },
|
||||
{ oEncryptTo, "encrypt-to", 2, "@" },
|
||||
{ oNoEncryptTo, "no-encrypt-to", 0, "@" },
|
||||
{ oUser, "local-user",2, N_("use this user-id to sign or decrypt")},
|
||||
|
@ -1186,13 +1188,26 @@ main( int argc, char **argv )
|
|||
#endif /* __riscos__ */
|
||||
break;
|
||||
case oKeyServer:
|
||||
if(parse_keyserver_uri(pargs.r.ret_str))
|
||||
if(pargs.r.ret_str==NULL || parse_keyserver_uri(pargs.r.ret_str))
|
||||
log_error(_("could not parse keyserver URI\n"));
|
||||
break;
|
||||
case oKeyServerOptions:
|
||||
parse_keyserver_options(pargs.r.ret_str);
|
||||
if(pargs.r.ret_str)
|
||||
parse_keyserver_options(pargs.r.ret_str);
|
||||
break;
|
||||
case oTempDir: opt.temp_dir=pargs.r.ret_str; break;
|
||||
case oExecPath:
|
||||
if(pargs.r.ret_str)
|
||||
{
|
||||
/* Notice that path is never freed. That is
|
||||
intentional due to the way putenv() works. */
|
||||
char *path=m_alloc(5+strlen(pargs.r.ret_str)+1);
|
||||
strcpy(path,"PATH=");
|
||||
strcat(path,pargs.r.ret_str);
|
||||
if(putenv(path)!=0)
|
||||
log_error(_("unable to set exec-path to %s\n"),path);
|
||||
}
|
||||
break;
|
||||
case oNotation: add_notation_data( pargs.r.ret_str ); break;
|
||||
case oShowNotation: opt.show_notation=1; break;
|
||||
case oNoShowNotation: opt.show_notation=0; break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue