summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--service_passwords.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/service_passwords.c b/service_passwords.c
index b0ed330..656a9c6 100644
--- a/service_passwords.c
+++ b/service_passwords.c
@@ -617,6 +617,7 @@ static int pre_entry(Slapi_PBlock *pb)
int gold_service = 0;
int gold_account = 0;
char *service = NULL;
+ char *service_dn = NULL;
char *parent_dn = NULL;
const char *result_dn = NULL;
Slapi_Entry *new_entry;
@@ -664,6 +665,18 @@ static int pre_entry(Slapi_PBlock *pb)
}
service = get_virtual_service(bind_dn);
+
+ service_dn = get_service_dn(service);
+ rc |= is_service(service_dn, NULL, &gold_service);
+ slapi_ch_free_string(&service_dn);
+
+ if (rc != 0) {
+ slapi_log_error(
+ SLAPI_LOG_PLUGIN, fn,
+ "Invalid service '%s' in bind dn '%s'.\n",
+ service, bind_dn);
+ goto fail1;
+ }
}
result_dn = slapi_entry_get_dn(entry);