From: Stephan Bosch Date: Mon, 2 Oct 2017 09:43:28 +0000 (+0200) Subject: lib-auth-client: auth-master - Move is_valid_string() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d566d1038857f381b1e5d2d9355a70a9f7dca1be;p=thirdparty%2Fdovecot%2Fcore.git lib-auth-client: auth-master - Move is_valid_string() --- diff --git a/src/lib-auth-client/auth-master.c b/src/lib-auth-client/auth-master.c index 780824f106..b5728feacc 100644 --- a/src/lib-auth-client/auth-master.c +++ b/src/lib-auth-client/auth-master.c @@ -355,19 +355,6 @@ static void auth_master_unset_io(struct auth_master_connection *conn) } } -static bool is_valid_string(const char *str) -{ - const char *p; - - /* make sure we're not sending any characters that have a special - meaning. */ - for (p = str; *p != '\0'; p++) { - if (*p == '\t' || *p == '\n' || *p == '\r') - return FALSE; - } - return TRUE; -} - static int auth_master_run_cmd_pre(struct auth_master_connection *conn, const char *cmd) { @@ -447,6 +434,19 @@ auth_master_next_request_id(struct auth_master_connection *conn) return conn->request_counter; } +static bool is_valid_string(const char *str) +{ + const char *p; + + /* make sure we're not sending any characters that have a special + meaning. */ + for (p = str; *p != '\0'; p++) { + if (*p == '\t' || *p == '\n' || *p == '\r') + return FALSE; + } + return TRUE; +} + static const char *const *args_hide_passwords(const char *const *args) { ARRAY_TYPE(const_string) new_args;