[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6604) nssov build error



Full_Name: Matt Hardin
Version: 2.4.23
OS: Solaris 9
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (184.11.32.102)


nssov.c doesn't compile correctly on systems that don't have a getpeereid
function because it doesn't use the LUTIL_GETPEEREID macro. The following patch
corrects this.

--- nssov.c.orig        Mon Jul 26 19:50:47 2010
+++ nssov.c     Mon Jul 26 19:32:15 2010
@@ -260,9 +260,15 @@
   uid_t uid;
   gid_t gid;
   char authid[sizeof("gidNumber=4294967295+uidNumber=424967295,cn=peercred,cn=external,cn=auth")];
+#ifdef LDAP_PF_LOCAL_SENDMSG
+  char peerbuf[8];
+  struct berval peerbv = BER_BVNULL;
+  peerbv.bv_val = peerbuf;
+  peerbv.bv_len = sizeof( peerbuf );
+#endif
 
   /* 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",