summaryrefslogtreecommitdiff
path: root/res/res_config_ldap.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2008-03-18 15:43:34 +0000
committerTerry Wilson <twilson@digium.com>2008-03-18 15:43:34 +0000
commitb02bc230af68d05df171a0a099d6c3d94168ab64 (patch)
treea07721daf3a91733bc3e073bab0697333d426e21 /res/res_config_ldap.c
parent760fc3403c7355fa05bc1b7470405239aad7af8e (diff)
Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_ldap.c')
-rw-r--r--res/res_config_ldap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index b76ad8ae7..028902adb 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -766,10 +766,10 @@ static struct ast_variable **realtime_ldap_base_ap(unsigned int *entries_count_p
ast_str_append(&filter, 0, "(&");
if (table_config && table_config->additional_filter)
- ast_str_append(&filter, 0, table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", table_config->additional_filter);
if (table_config != base_table_config && base_table_config &&
base_table_config->additional_filter) {
- ast_str_append(&filter, 0, base_table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", base_table_config->additional_filter);
}
/* Create the first part of the query using the first parameter/value pairs we just extracted */
@@ -1171,11 +1171,11 @@ static int update_ldap(const char *basedn, const char *table_name, const char *a
/* Create the filter with the table additional filter and the parameter/value pairs we were given */
ast_str_append(&filter, 0, "(&");
if (table_config && table_config->additional_filter) {
- ast_str_append(&filter, 0, table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", table_config->additional_filter);
}
if (table_config != base_table_config && base_table_config
&& base_table_config->additional_filter) {
- ast_str_append(&filter, 0, base_table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", base_table_config->additional_filter);
}
append_var_and_value_to_filter(&filter, table_config, attribute, lookup);
ast_str_append(&filter, 0, ")");