ITS#10211 slapd: Fix peercred uid and gid format

uid and gid are unsigned int and so should be formatted as such when
creating the authid string.
This commit is contained in:
Nick Porter 2024-05-02 08:48:14 +01:00 committed by Howard Chu
parent e3ceced146
commit bf01750381

View file

@ -2270,9 +2270,9 @@ slap_listener(
STRLENOF( "gidNumber=4294967295+uidNumber=4294967295,"
"cn=peercred,cn=external,cn=auth" ) + 1 );
authid.bv_len = sprintf( authid.bv_val,
"gidNumber=%d+uidNumber=%d,"
"gidNumber=%u+uidNumber=%u,"
"cn=peercred,cn=external,cn=auth",
(int) gid, (int) uid );
gid, uid );
assert( authid.bv_len <=
STRLENOF( "gidNumber=4294967295+uidNumber=4294967295,"
"cn=peercred,cn=external,cn=auth" ) );