Question about server_info_update_pending

Will Fiveash will.fiveash at
Mon Jun 26 15:46:08 EDT 2017

On Mon, Jun 26, 2017 at 03:11:04PM -0400, Greg Hudson wrote:
> On 06/26/2017 02:38 PM, Will Fiveash wrote:
> > Today I was looking through the ldap plugin code and I noticed that
> > there are references to a boolean variable, server_info_update_pending,
> > which I see only being set to FALSE in a couple places but never TRUE.
> > Is this variable ever used?
> It doesn't look like it.  The only code that uses the field is inside
> #ifdef ASYNC_BIND blocks, and we never define ASYNC_BIND.  So we could
> get rid of all of that, I think.

That's what I suspected.  Thanks for checking on that.  Note:

typedef struct  _krb5_ldap_server_handle {
    int                              msgid;
    LDAP                             *ldap_handle;
    krb5_boolean                     server_info_update_pending; <<<<<
    krb5_ldap_server_info            *server_info;
    struct _krb5_ldap_server_handle  *next;
} krb5_ldap_server_handle;

So if you decide to remove the #ifdef ASYNC_BIND blocks and all
references to server_info_update_pending I suppose one concern is ABI
issues around krb5_ldap_server_handle.  I took a quick look and every
use of krb5_ldap_server_handle in the function declarations and all are
pointer args so it should be safe to remove the
server_info_update_pending field.

Will Fiveash
Oracle Solaris Software Engineer

More information about the krbdev mailing list