[PATCH 3/3] dirmngr: Implement --supervised command (for systemd, etc).

NIIBE Yutaka gniibe at fsij.org
Thu Oct 27 03:59:42 CEST 2016


Hello,

I reviewed and applied all of your three patches.  I fixed minor
formatting and typing of C language issues.  Pushed.

Besides,

On 10/27/2016 05:37 AM, Daniel Kahn Gillmor wrote:
> --- a/dirmngr/dirmngr.c
> +++ b/dirmngr/dirmngr.c
> @@ -993,6 +996,44 @@ main (int argc, char **argv)
>        start_command_handler (ASSUAN_INVALID_FD);
>        shutdown_reaper ();
>      }
> +  else if (cmd == aSupervised)
> +    {
> +    /* In supervised mode, we expect file descriptor 3 to be an
> +       already opened, listening socket.
> +
> +       We will also not detach from the controlling process or close
> +       stderr; the supervisor should handle all of that.
> +     */
> +      struct stat statbuf;
> +      if (fstat (3, &statbuf) == -1 && errno ==EBADF)
> +        {
> +          log_fatal (_("file descriptor 3 must be already open in --supervised mode\n"));
> +          dirmngr_exit (1);
> +        }

I changed log_fatal into log_error, so that dirmngr_exit will be
called, and the message is not required to be translated, just like
the one of gpg-agent.c.

If these messages are needed to be translated, let us do that in
another change consistently, so that we can minimize translators'
work.
-- 



More information about the Gnupg-devel mailing list