Commit 840e7f2c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Include <ac/unistd.h> not <sys/types.h> and <unistd.h>

Use sizeof( string ) to determine buffer size
Put authzDN in same for as used on server
(We could, just as well, set authid to "fubar" as it matters
not what it is set to)
parent 5b87c4c4
......@@ -22,8 +22,7 @@
#include <ac/string.h>
#include <ac/time.h>
#include <unistd.h>
#include <sys/types.h>
#include <ac/unistd.h>
#include "ldap-int.h"
#include "ldap_log.h"
......@@ -361,8 +360,11 @@ ldap_int_open_connection(
* yet anyway.
*/
if( proto == LDAP_PROTO_IPC ) {
char authid[64];
sprintf( authid, "uid=%d+gid=%d", geteuid(), getegid() );
char authid[sizeof("uidNumber=XXXXXX,gidNumber=XXXXXX,"
"cn=peercred,cn=external,cn=auth")];
sprintf( authid, "uidNumber=%d,gidNumber=%d,"
"cn=peercred,cn=external,cn=auth",
geteuid(), getegid() );
ldap_int_sasl_external( ld, conn, authid, sasl_ssf );
}
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment