mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
* findkey.c (agent_write_private_key,agent_key_from_file) (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant. * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * protect-tool.c (store_private_key): New. (import_p12_file): Store the new file if requested. (main): New options --force and --store. * gpg-agent.c (main): Set a global flag when runing detached. * query.c (start_pinentry): Pass the list of FD to keep in the child when not running detached. * call-scd.c (start_scd): Ditto.
This commit is contained in:
parent
738e6d8212
commit
56b049686f
13 changed files with 769 additions and 41 deletions
|
@ -295,13 +295,7 @@ main (int argc, char **argv )
|
|||
|
||||
opt.homedir = getenv("GNUPGHOME");
|
||||
if (!opt.homedir || !*opt.homedir)
|
||||
{
|
||||
#ifdef HAVE_DRIVE_LETTERS
|
||||
opt.homedir = "c:/gnupg-test";
|
||||
#else
|
||||
opt.homedir = "~/.gnupg-test";
|
||||
#endif
|
||||
}
|
||||
opt.homedir = GNUPG_DEFAULT_HOMEDIR;
|
||||
opt.def_cache_ttl = 10*60; /* default to 10 minutes */
|
||||
|
||||
|
||||
|
@ -473,7 +467,6 @@ main (int argc, char **argv )
|
|||
{ /* regular server mode */
|
||||
int fd;
|
||||
pid_t pid;
|
||||
int i;
|
||||
int len;
|
||||
struct sockaddr_un serv_addr;
|
||||
char *p;
|
||||
|
@ -599,7 +592,10 @@ main (int argc, char **argv )
|
|||
|
||||
/* detach from tty and put process into a new session */
|
||||
if (!nodetach )
|
||||
{ /* close stdin, stdout and stderr unless it is the log stream */
|
||||
{
|
||||
int i;
|
||||
|
||||
/* close stdin, stdout and stderr unless it is the log stream */
|
||||
for (i=0; i <= 2; i++)
|
||||
{
|
||||
if ( log_get_fd () != i)
|
||||
|
@ -611,6 +607,7 @@ main (int argc, char **argv )
|
|||
cleanup ();
|
||||
exit (1);
|
||||
}
|
||||
opt.running_detached = 1;
|
||||
}
|
||||
|
||||
if (chdir("/"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue