Discussion:
Question about server_info_update_pending
Will Fiveash
2017-06-26 18:38:53 UTC
Permalink
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?
--
Will Fiveash
Oracle Solaris Software Engineer
_______________________________________________
krbdev mailing list ***@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev
Greg Hudson
2017-06-26 19:11:04 UTC
Permalink
Post by Will Fiveash
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.

_______________________________________________
krbdev mailing list ***@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev
Will Fiveash
2017-06-26 19:46:08 UTC
Permalink
Post by Greg Hudson
Post by Will Fiveash
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
_______________________________________________
krbdev mailing list ***@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev
Loading...