summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/ldap_id.c2
-rw-r--r--src/providers/ldap/ldap_opts.h1
-rw-r--r--src/providers/ldap/sdap.c5
-rw-r--r--src/providers/ldap/sdap.h2
-rw-r--r--src/providers/ldap/sdap_id_op.c1
5 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index 889fbddc..9515219c 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -821,12 +821,14 @@ static void sdap_check_online_done(struct tevent_req *req)
srv_opts->max_user_value = 0;
srv_opts->max_group_value = 0;
srv_opts->max_service_value = 0;
+ srv_opts->max_sudo_value = 0;
} else if (strcmp(srv_opts->server_id, check_ctx->id_ctx->srv_opts->server_id) == 0
&& srv_opts->supports_usn
&& check_ctx->id_ctx->srv_opts->last_usn > srv_opts->last_usn) {
check_ctx->id_ctx->srv_opts->max_user_value = 0;
check_ctx->id_ctx->srv_opts->max_group_value = 0;
check_ctx->id_ctx->srv_opts->max_service_value = 0;
+ check_ctx->id_ctx->srv_opts->max_sudo_value = 0;
check_ctx->id_ctx->srv_opts->last_usn = srv_opts->last_usn;
}
diff --git a/src/providers/ldap/ldap_opts.h b/src/providers/ldap/ldap_opts.h
index c81b0b1e..d925851d 100644
--- a/src/providers/ldap/ldap_opts.h
+++ b/src/providers/ldap/ldap_opts.h
@@ -305,6 +305,7 @@ struct sdap_attr_map native_sudorule_map[] = {
{ "ldap_sudorule_notbefore", "sudoNotBefore", SYSDB_SUDO_CACHE_AT_NOTBEFORE, NULL },
{ "ldap_sudorule_notafter", "sudoNotAfter", SYSDB_SUDO_CACHE_AT_NOTAFTER, NULL },
{ "ldap_sudorule_order", "sudoOrder", SYSDB_SUDO_CACHE_AT_ORDER, NULL },
+ { "ldap_sudorule_entry_usn", NULL, SYSDB_USN, NULL },
SDAP_ATTR_MAP_TERMINATOR
};
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index 325825e2..cc073412 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -994,6 +994,11 @@ int sdap_get_server_opts_from_rootdse(TALLOC_CTX *memctx,
talloc_strdup(opts->service_map,
opts->gen_map[SDAP_AT_ENTRY_USN].name);
}
+ if (!opts->sudorule_map[SDAP_AT_SUDO_USN].name) {
+ opts->sudorule_map[SDAP_AT_SUDO_USN].name =
+ talloc_strdup(opts->sudorule_map,
+ opts->gen_map[SDAP_AT_ENTRY_USN].name);
+ }
*srv_opts = so;
return EOK;
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index 68acf2cc..a178b8ce 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -312,6 +312,7 @@ enum sdap_sudorule_attrs {
SDAP_AT_SUDO_NOTBEFORE,
SDAP_AT_SUDO_NOTAFTER,
SDAP_AT_SUDO_ORDER,
+ SDAP_AT_SUDO_USN,
SDAP_OPTS_SUDO /* attrs counter */
};
@@ -396,6 +397,7 @@ struct sdap_server_opts {
char *max_user_value;
char *max_group_value;
char *max_service_value;
+ char *max_sudo_value;
};
struct sdap_id_ctx;
diff --git a/src/providers/ldap/sdap_id_op.c b/src/providers/ldap/sdap_id_op.c
index 539f26f0..d4f6fe34 100644
--- a/src/providers/ldap/sdap_id_op.c
+++ b/src/providers/ldap/sdap_id_op.c
@@ -542,6 +542,7 @@ static void sdap_id_op_connect_done(struct tevent_req *subreq)
current_srv_opts->max_user_value = 0;
current_srv_opts->max_group_value = 0;
current_srv_opts->max_service_value = 0;
+ current_srv_opts->max_sudo_value = 0;
current_srv_opts->last_usn = srv_opts->last_usn;
}
}