From 5ae22791abd797b1004067f14d6ef3967a3cab75 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 29 Jun 2005 12:37:28 +0000 Subject: [PATCH] hardcode normalized instead of funky DN form --- servers/slapd/daemon.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 2797e85ecf..3b93244c37 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1372,12 +1372,15 @@ slapd_handle_listener( if( getpeereid( s, &uid, &gid ) == 0 ) { authid.bv_val = ch_malloc( - sizeof("uidnumber=4294967295+gidnumber=4294967295," - "cn=peercred,cn=external,cn=auth")); + STRLENOF( "gidNumber=4294967295+uidNumber=4294967295," + "cn=peercred,cn=external,cn=auth" ) + 1 ); authid.bv_len = sprintf( authid.bv_val, - "uidnumber=%d+gidnumber=%d," + "gidNumber=%d+uidNumber=%d," "cn=peercred,cn=external,cn=auth", - (int) uid, (int) gid); + (int) gid, (int) uid ); + assert( authid.bv_len <= + STRLENOF( "gidNumber=4294967295+uidNumber=4294967295," + "cn=peercred,cn=external,cn=auth" ) ); } } dnsname = "local"; -- 2.39.5