mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
gpg-agent.c (main): In detached mode connect standard descriptors to /dev/null.
Other minor fixes
This commit is contained in:
parent
fac4babd9d
commit
c1f4a8edff
@ -1,3 +1,15 @@
|
|||||||
|
2006-11-09 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* gpg-agent.c (main): In detached mode connect standard
|
||||||
|
descriptors to /dev/null.
|
||||||
|
|
||||||
|
* trustlist.c (read_trustfiles): Make sure not to pass a zero size
|
||||||
|
to realloc as the C standards says that this behaves like free.
|
||||||
|
|
||||||
|
2006-11-06 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* protect-tool.c (my_strusage): Fixed typo.
|
||||||
|
|
||||||
2006-10-23 Werner Koch <wk@g10code.com>
|
2006-10-23 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* gpg-agent.c (main): New command --gpgconf-test.
|
* gpg-agent.c (main): New command --gpgconf-test.
|
||||||
|
@ -1007,7 +1007,16 @@ main (int argc, char **argv )
|
|||||||
for (i=0; i <= 2; i++)
|
for (i=0; i <= 2; i++)
|
||||||
{
|
{
|
||||||
if (!log_test_fd (i) && i != fd )
|
if (!log_test_fd (i) && i != fd )
|
||||||
close (i);
|
{
|
||||||
|
if ( ! close (i)
|
||||||
|
&& open ("/dev/null", i? O_WRONLY : O_RDONLY) == -1)
|
||||||
|
{
|
||||||
|
log_error ("failed to open `%s': %s\n",
|
||||||
|
"/dev/null", strerror (errno));
|
||||||
|
cleanup ();
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (setsid() == -1)
|
if (setsid() == -1)
|
||||||
{
|
{
|
||||||
|
@ -145,7 +145,7 @@ my_strusage (int level)
|
|||||||
case 1:
|
case 1:
|
||||||
case 40: p = _("Usage: gpg-protect-tool [options] (-h for help)\n");
|
case 40: p = _("Usage: gpg-protect-tool [options] (-h for help)\n");
|
||||||
break;
|
break;
|
||||||
case 41: p = _("Syntax: gpg-protect-tool [options] [args]]\n"
|
case 41: p = _("Syntax: gpg-protect-tool [options] [args]\n"
|
||||||
"Secret key maintenance tool\n");
|
"Secret key maintenance tool\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -317,8 +317,7 @@ read_trustfiles (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fixme: we should drop duplicates and sort the table. */
|
/* Fixme: we should drop duplicates and sort the table. */
|
||||||
|
ti = xtryrealloc (table, (tableidx?tableidx:1) * sizeof *table);
|
||||||
ti = xtryrealloc (table, tableidx * sizeof *table);
|
|
||||||
if (!ti)
|
if (!ti)
|
||||||
{
|
{
|
||||||
xfree (table);
|
xfree (table);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user