Fix in access control identity subject compare

Fixed a bug in the subject compare function for identity subjects, that
could cause using the incorrect permission grant in case multiple grants
are provided in the permissions configuration of the access control plugin.

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
This commit is contained in:
Dennis Potman 2020-03-24 21:24:16 +01:00 committed by eboasson
parent cec8aea6c9
commit bf23dee70a

View file

@ -282,7 +282,7 @@ bool ac_check_subjects_are_equal(const char *permissions_sn, const char *identit
if (name_idsn == NULL || tok_idsn == NULL) if (name_idsn == NULL || tok_idsn == NULL)
goto check_subj_equal_failed; goto check_subj_equal_failed;
value_pmsn = DDS_Security_Property_get_value(&prop_pmsn, name_idsn); value_pmsn = DDS_Security_Property_get_value(&prop_pmsn, name_idsn);
if (value_pmsn == NULL || strcmp(value_pmsn, value_pmsn) != 0) if (value_pmsn == NULL || strcmp(tok_idsn, value_pmsn) != 0)
{ {
ddsrt_free(value_pmsn); ddsrt_free(value_pmsn);
goto check_subj_equal_failed; goto check_subj_equal_failed;