diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2009-01-30 19:05:06 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2009-01-30 19:05:06 +0100 |
commit | f829aa077cf947543ef3547d7a688fd8c122c627 (patch) | |
tree | 417a3ff2e2dc67e8cd3497fd8343310a1f93336a /compat | |
parent | b3e8f601048ff225f841021784063367887631b6 (diff) |
fix for getpeercred() on Solaris by David Bartley <dtbartle@csclub.uwaterloo.ca>
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@807 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'compat')
-rw-r--r-- | compat/getpeercred.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/getpeercred.c b/compat/getpeercred.c index 0e81dc0..a003bae 100644 --- a/compat/getpeercred.c +++ b/compat/getpeercred.c @@ -77,14 +77,14 @@ int getpeercred(int sock,uid_t *uid,gid_t *gid,pid_t *pid) return 0; #elif defined(HAVE_GETPEERUCRED) ucred_t *cred=NULL; - if (getpeerucred(client,&cred)) + if (getpeerucred(sock,&cred)) return -1; /* save the data */ - if (uid!=NULL) *uid=ucred_geteuid(&cred); - if (gid!=NULL) *gid=ucred_getegid(&cred); - if (pid!=NULL) *pid=ucred_getpid(&cred); + if (uid!=NULL) *uid=ucred_geteuid(cred); + if (gid!=NULL) *gid=ucred_getegid(cred); + if (pid!=NULL) *pid=ucred_getpid(cred); /* free cred and return */ - ucred_free(&ucred); + ucred_free(cred); return 0; #elif defined(HAVE_GETPEEREID) uid_t tuid; |