summaryrefslogtreecommitdiffstats
path: root/ctdb/common/system_linux.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2011-12-06 13:15:41 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2011-12-06 13:16:15 +1100
commitc3ee62439fe9db1560db29d13b7433bfadcda40d (patch)
tree6aac1e4e3ebb4db4867d6bbf2103c4406514aa2a /ctdb/common/system_linux.c
parent609149bdc82488b236c221d80aa7d517077fb950 (diff)
downloadsamba-c3ee62439fe9db1560db29d13b7433bfadcda40d.tar.gz
samba-c3ee62439fe9db1560db29d13b7433bfadcda40d.tar.xz
samba-c3ee62439fe9db1560db29d13b7433bfadcda40d.zip
Return the peer_pid properly to the caller
(This used to be ctdb commit 0f15a2c65db8f8b4ac0d5ad2755b9aa3c2a8b279)
Diffstat (limited to 'ctdb/common/system_linux.c')
-rw-r--r--ctdb/common/system_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c
index cb26dcd654..464daef9ad 100644
--- a/ctdb/common/system_linux.c
+++ b/ctdb/common/system_linux.c
@@ -570,7 +570,7 @@ int ctdb_get_peer_pid(const int fd, pid_t *peer_pid)
socklen_t crl = sizeof(struct ucred);
int ret;
if ((ret = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &crl) == 0)) {
- peer_pid = cr.pid;
+ *peer_pid = cr.pid;
}
return ret;
}