From: Doug Goldstein Date: Sat, 21 Sep 2013 16:02:08 +0000 (-0500) Subject: BSD: Ensure process creation timestamp is init'd X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=03ee919e9b15f1e692adf4167c121398f31392c0;p=libvirt.git BSD: Ensure process creation timestamp is init'd While BSDs don't support process creation timestamp information via PEERCRED for Unix sockets, we need to actually initialize the value because it is used by the libvirt code. --- diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 49c6ddc6fa..152c5fcdfc 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -1153,7 +1153,7 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock, uid_t *uid, gid_t *gid, pid_t *pid, - unsigned long long *timestamp ATTRIBUTE_UNUSED) + unsigned long long *timestamp) { struct xucred cr; socklen_t cr_len = sizeof(cr); @@ -1178,7 +1178,9 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock, return -1; } + /* PID and process creation time are not supported on BSDs */ *pid = -1; + *timestamp = -1; *uid = cr.cr_uid; *gid = cr.cr_gid;