r17630: Looks like getpeerid() is a system function on
authorJeremy Allison <jra@samba.org>
Sun, 20 Aug 2006 20:05:49 +0000 (20:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:44 +0000 (11:38 -0500)
FreeBSD. Change to sys_getpeerid(). Thanks to
vl for pointing this out.
Jeremy.
(This used to be commit dd0069cfcabb25dc7dc0d336696a5f2580abb5a1)

source3/lib/system.c
source3/nsswitch/winbindd_ccache_access.c

index bd7e4b8a67f26c811efccdcc8c6c43d02b57f1f1..42f9615c9e4c50cef09553daf4456ffdd2801ce0 100644 (file)
@@ -2243,7 +2243,7 @@ int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct
 }
 #endif /* WITH_AIO */
 
-int getpeereid( int s, uid_t *uid)
+int sys_getpeereid( int s, uid_t *uid)
 {
 #if defined(HAVE_PEERCRED)
        struct ucred cred;
index 6ac3942a8d64120b0a33e9cf4fd60c6e980b4a05..d17f15ae9ff0b250669ff7042b95453d92bca801 100644 (file)
@@ -130,7 +130,7 @@ static BOOL check_client_uid(struct winbindd_cli_state *state, uid_t uid)
 
        ret_uid = (uid_t)-1;
 
-       ret = getpeereid(state->sock, &ret_uid);
+       ret = sys_getpeereid(state->sock, &ret_uid);
        if (ret != 0) {
                DEBUG(1, ("check_client_uid: Could not get socket peer uid: %s; "
                        "denying access\n", strerror(errno)));