]> git.sur5r.net Git - openldap/commitdiff
ITS#6604 use LUTIL_GETPEEREID()
authorHoward Chu <hyc@openldap.org>
Wed, 28 Jul 2010 22:26:35 +0000 (22:26 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 28 Jul 2010 22:26:35 +0000 (22:26 +0000)
contrib/slapd-modules/nssov/nssov.c

index b5ffeb64aa13ebce56d6f29d3dc9062e083e0efb..84e05b2e6fdd45a74c7893d5327d96ea1eda747d 100644 (file)
@@ -260,9 +260,11 @@ static void handleconnection(nssov_info *ni,int sock,Operation *op)
   uid_t uid;
   gid_t gid;
   char authid[sizeof("gidNumber=4294967295+uidNumber=424967295,cn=peercred,cn=external,cn=auth")];
+  char peerbuf[8];
+  struct berval peerbv = { sizeof(peerbuf), peerbuf };
 
   /* log connection */
-  if (lutil_getpeereid(sock,&uid,&gid))
+  if (LUTIL_GETPEEREID(sock,&uid,&gid,&peerbv))
     Debug( LDAP_DEBUG_TRACE,"nssov: connection from unknown client: %s\n",strerror(errno),0,0);
   else
     Debug( LDAP_DEBUG_TRACE,"nssov: connection from uid=%d gid=%d\n",