Changeset 198


Ignore:
Timestamp:
Nov 21, 2008, 10:47:11 PM (16 years ago)
Author:
katerina
Message:

If debug output is chosen, don't redirect gpg stderr to /dev/null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_gpg.c

    r174 r198  
    241241                            int mode, char * id, char * homedir)
    242242{
     243  extern int flag_err_debug;
    243244  int pipedes[2];
    244245  FILE * outf = NULL;
     
    489490      sh_unix_closeall (3, -1, SL_TRUE); /* in child process */
    490491
    491       if (NULL == freopen(_("/dev/null"), "r+", stderr))
    492         {
    493           dlog(1, FIL__, __LINE__, _("Internal error: freopen failed\n"));
    494           aud__exit(FIL__, __LINE__, EXIT_FAILURE);
    495         }
     492      if (flag_err_debug != SL_TRUE)
     493        {
     494          if (NULL == freopen(_("/dev/null"), "r+", stderr))
     495            {
     496              dlog(1, FIL__, __LINE__, _("Internal error: freopen failed\n"));
     497              aud__exit(FIL__, __LINE__, EXIT_FAILURE);
     498            }
     499        }
     500
    496501
    497502      /* We should become privileged if SUID,
Note: See TracChangeset for help on using the changeset viewer.