summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_ccache_access.c3
-rw-r--r--source3/winbindd/winbindd_pam_logoff.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_ccache_access.c b/source3/winbindd/winbindd_ccache_access.c
index 411b2b4c3a..5557b959f0 100644
--- a/source3/winbindd/winbindd_ccache_access.c
+++ b/source3/winbindd/winbindd_ccache_access.c
@@ -157,10 +157,11 @@ static bool check_client_uid(struct winbindd_cli_state *state, uid_t uid)
{
int ret;
uid_t ret_uid;
+ gid_t ret_gid;
ret_uid = (uid_t)-1;
- ret = sys_getpeereid(state->sock, &ret_uid);
+ ret = getpeereid(state->sock, &ret_uid, &ret_gid);
if (ret != 0) {
DEBUG(1, ("check_client_uid: Could not get socket peer uid: %s; "
"denying access\n", strerror(errno)));
diff --git a/source3/winbindd/winbindd_pam_logoff.c b/source3/winbindd/winbindd_pam_logoff.c
index c32a63e146..b3c60adf85 100644
--- a/source3/winbindd/winbindd_pam_logoff.c
+++ b/source3/winbindd/winbindd_pam_logoff.c
@@ -37,6 +37,7 @@ struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain;
fstring name_domain, user;
uid_t caller_uid;
+ gid_t caller_gid;
int res;
req = tevent_req_create(mem_ctx, &state,
@@ -71,7 +72,7 @@ struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
caller_uid = (uid_t)-1;
- res = sys_getpeereid(cli->sock, &caller_uid);
+ res = getpeereid(cli->sock, &caller_uid, &caller_gid);
if (res != 0) {
DEBUG(1,("winbindd_pam_logoff: failed to check peerid: %s\n",
strerror(errno)));