Home GnuPG

Better credential support for other OSes.

Description

Better credential support for other OSes.

* configure.ac (HAVE_UCRED_H, HAVE_SYS_UCRED_H): Check these headers
unconditionally.
(HAVE_SO_PEERCRED, HAVE_LOCAL_PEEREID): Remove.
(HAVE_STRUCT_SOCKPEERCRED_PID): New.
(HAVE_GETPEEREID): New.
* src/assuan-socket-server.c (accept_connection_bottom): Add
support for OpenBSD, macOS, and FreeBSD.

Code in gpg-agent/command-ssh.c are integrated.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Feb 20 2018, 2:48 AM
Parents
rA9d7ac1e7deb7: Post release updates
Branches
Unknown
Tags
Unknown

Event Timeline

aheinecke added inline comments.
/src/assuan-socket-server.c
144

Compiling libassuan with the ./autogen.sh --build-w32 configuration leads to this error:

/home/aheinecke/arbeit/kf5/src/libassuan/src/assuan-socket-server.c: In function 'accept_connection_bottom':
/home/aheinecke/arbeit/kf5/src/libassuan/src/assuan-socket-server.c:144:43: error: 'struct _assuan_peercred' has no member named 'pid'
   if (ctx->peercred_valid && ctx->peercred.pid != ASSUAN_INVALID_PID)
                                           ^
/home/aheinecke/arbeit/kf5/src/libassuan/src/assuan-socket-server.c:145:29: error: 'struct _assuan_peercred' has no member named 'pid'
     ctx->pid = ctx->peercred.pid;
                             ^

Does this need an ifdef guard? I don't understand the code enough myself to fix this.