summaryrefslogtreecommitdiff
path: root/src/providers/ldap/ldap_id.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/ldap_id.c')
-rw-r--r--src/providers/ldap/ldap_id.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index de618333..a3c9c0cd 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -726,9 +726,12 @@ static void sdap_check_online_done(struct tevent_req *req)
} else {
dp_err = DP_ERR_OK;
- if (strcmp(srv_opts->server_id, ctx->srv_opts->server_id) == 0 &&
- srv_opts->supports_usn &&
- ctx->srv_opts->last_usn > srv_opts->last_usn) {
+ if (!ctx->srv_opts) {
+ srv_opts->max_user_value = 0;
+ srv_opts->max_group_value = 0;
+ } else if (strcmp(srv_opts->server_id, ctx->srv_opts->server_id) == 0
+ && srv_opts->supports_usn
+ && ctx->srv_opts->last_usn > srv_opts->last_usn) {
ctx->srv_opts->max_user_value = 0;
ctx->srv_opts->max_group_value = 0;
ctx->srv_opts->last_usn = srv_opts->last_usn;