res_config_ldap: Don't try to delete non-existent attributes
authorSean Bright <sean.bright@gmail.com>
Mon, 20 Feb 2017 11:53:47 +0000 (06:53 -0500)
committerSean Bright <sean.bright@gmail.com>
Mon, 20 Feb 2017 12:06:00 +0000 (07:06 -0500)
commite84353b8a8107b370d5e7ec9c9536642d877c8e8
treecab04701fb285a854b19c52e26a10f5bfe698345
parent9f392574f933e4c2d4e5e6b11c6baf02e227630d
res_config_ldap: Don't try to delete non-existent attributes

OpenLDAP will raise an error when we try to delete an LDAP attribute
that doesn't exist. We need to filter out LDAP_MOD_DELETE requests
based on which attributes the current LDAP entry actually has. There
is of course a small window of opportunity for this to still fail,
but it is much less likely now.

Change-Id: I3fe1b04472733e43151563aaf9f8b49980273e6b
res/res_config_ldap.c