/* dpm integration test & radio popup test */
int set_password_quality_handler(struct dpm_toolkit_entity* self)
{
- dlog_print(DLOG_DEBUG, LOG_TAG, "set_password_quality_handler");
+ dlog_print(DLOG_DEBUG, LOG_TAG, "set_password_quality_handler");
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
char radio_text[][MAX_RADIO_TEXT_LEN] = {"UNSPECIFIED", "SIMPLE_PASSWORD", "SOMETHING", "NUMERIC", "ALPHABETIC", "ALPHANUMERIC"};
int radio_num = sizeof(radio_text) / sizeof(radio_text[0]);
dpm_password_quality_e quality;
- const char param_zone[] = "owner";
handler_display_radio_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"), selected_policy, radio_text, radio_num);
-
+
dlog_print(DLOG_DEBUG, LOG_TAG, "radio index: %d", selected_policy->radio_index);
switch(selected_policy->radio_index) {
default:
quality = DPM_PASSWORD_QUALITY_UNSPECIFIED;
break;
- }
+ }
dlog_print(DLOG_DEBUG, LOG_TAG, "Password Quality: %s", radio_text[selected_policy->radio_index]);
return POLICY_RESULT_FAIL;
}
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_quality(password_policy_handle, quality) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_SUCCESS;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int min_length;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_minimum_length(password_policy_handle, min_length) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int min_complex_chars;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_min_complex_chars(password_policy_handle, min_complex_chars) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int max_failed_attempts;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_maximum_failed_attempts_for_wipe(password_policy_handle, max_failed_attempts) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int expired_day;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_expires(password_policy_handle, expired_day) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int history;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_history(password_policy_handle, history) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
- const char param_zone[] = "owner";
+ char* input;
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_pattern(password_policy_handle, input) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
- const char param_zone[] = "owner";
+ char* input;
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_reset(password_policy_handle, input) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dlog_print(DLOG_DEBUG, LOG_TAG, "enforce_password_change_handler");
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
- const char param_zone[] = "owner";
handle = dpm_context_create();
if (handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_enforce_change(password_policy_handle) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_SUCCESS;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int max_inactivity_time;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_max_inactivity_time_device_lock(password_policy_handle, max_inactivity_time) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_toolkit_entity_t* selected_policy = self;
char num_text[10];
int max_inactivity_time;
- const char param_zone[] = "owner";
handle = dpm_context_create();
if (handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_get_max_inactivity_time_device_lock(password_policy_handle, &max_inactivity_time) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
snprintf(num_text,sizeof(num_text),"%d",max_inactivity_time);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"), num_text);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int status;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_status(password_policy_handle, status) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dlog_print(DLOG_DEBUG, LOG_TAG, "delete_password_pattern_handler");
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
- const char param_zone[] = "owner";
handle = dpm_context_create();
if (handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_delete_pattern(password_policy_handle) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_SUCCESS;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* password_pattern;
- const char param_zone[] = "owner";
+ char* password_pattern;
handle = dpm_context_create();
if (handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
- dlog_print(DLOG_DEBUG, LOG_TAG, "dpm_password_get_pattern_in");
+ dlog_print(DLOG_DEBUG, LOG_TAG, "dpm_password_get_pattern_in");
if (dpm_password_get_pattern(password_policy_handle, &password_pattern) == 0) {
- dlog_print(DLOG_DEBUG, LOG_TAG, "dpm_password_get_pattern_out");
+ dlog_print(DLOG_DEBUG, LOG_TAG, "dpm_password_get_pattern_out");
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"), password_pattern);
free(password_pattern);
dpm_context_release_password_policy(handle, password_policy_handle);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int max_char_occur;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_maximum_character_occurrences(password_policy_handle, max_char_occur) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_toolkit_entity_t* selected_policy = self;
char num_text[10];
int max_char_occur;
- const char param_zone[] = "owner";
handle = dpm_context_create();
if (handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_get_maximum_character_occurrences(password_policy_handle, &max_char_occur) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
snprintf(num_text,sizeof(num_text),"%d",max_char_occur);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"), num_text);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_context_h handle;
dpm_password_policy_h password_policy_handle;
dpm_toolkit_entity_t* selected_policy = self;
- char* input;
+ char* input;
int max_numeric_seq_length;
- const char param_zone[] = "owner";
handler_display_input_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),selected_policy);
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_set_maximum_numeric_sequence_length(password_policy_handle, max_numeric_seq_length) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"),input);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}
dpm_toolkit_entity_t* selected_policy = self;
char num_text[10];
int max_numeric_seq_length;
- const char param_zone[] = "owner";
handle = dpm_context_create();
if (handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create client handle");
return POLICY_RESULT_FAIL;
}
-
- password_policy_handle = dpm_context_acquire_password_policy(handle, param_zone);
+
+ password_policy_handle = dpm_context_acquire_password_policy(handle);
if (password_policy_handle == NULL) {
dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create password policy handle");
return POLICY_RESULT_FAIL;
}
if (dpm_password_get_maximum_numeric_sequence_length(password_policy_handle, &max_numeric_seq_length) == 0) {
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
snprintf(num_text,sizeof(num_text),"%d",max_numeric_seq_length);
display_result_popup((char *)xmlGetProp(selected_policy->model, (xmlChar *) "desc"), num_text);
return POLICY_RESULT_NONE;
}
- dpm_context_release_password_policy(handle, password_policy_handle);
+ dpm_context_release_password_policy(handle, password_policy_handle);
dpm_context_destroy(handle);
return POLICY_RESULT_FAIL;
}