Page MenuHome GnuPG

No sharing of log_fd between child process
Open, NormalPublic

Description

When connecting pinentry/scdaemon/gpg-server/gpg-agent, it uses assuan_pipe_connect with no_close_list having file descriptor of log_get_fd ().

But, log_get_fd () has been returning -1 since the commit of rG02566c585616: Change logging to use estream. The makes logging to a socket also work on… in 2010. That's because it's now USER backend stream with read/write function not FP backend stream.

In the first place, this handling of allowing use of log_fd by not-closing FD is questionable. (If used, we need to pass the fd information from parent to child, but this part is never implemented.)

It is better for a program to open its independent log-file, if needed, not re-using the file descriptor opened by parent process.

So, removal of the code should be done.