Explorar o código

Bug 691574 - (cov#10573) check return value in GER code

We should check the return value of proxyauth_get_dn() in the
get effective rights code.
Nathan Kinder %!s(int64=14) %!d(string=hai) anos
pai
achega
53da4c8190
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      ldap/servers/plugins/acl/acleffectiverights.c

+ 1 - 2
ldap/servers/plugins/acl/acleffectiverights.c

@@ -124,8 +124,7 @@ _ger_g_permission_granted (
 	/*
 	 * The requestor may be either the bind dn or a proxy dn
 	 */
-	proxyauth_get_dn ( pb, &proxydn, &errtext );
-	if ( proxydn != NULL )
+	if ((proxyauth_get_dn( pb, &proxydn, &errtext ) == LDAP_SUCCESS) && ( proxydn != NULL )) {
 	{
 		requestor_sdn = slapi_sdn_new_dn_passin ( proxydn );
 	}