]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: master-login-auth - Detect connection to auth-client socket for better...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 30 Jan 2019 23:14:04 +0000 (00:14 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 3 Feb 2019 11:22:43 +0000 (12:22 +0100)
src/lib-master/master-login-auth.c

index df6b93ca9de76a3a02ac98caf9cc2115bed21e14..f5a27f883e905063c524eee9934380f3334d003d 100644 (file)
@@ -422,6 +422,13 @@ master_login_auth_input_args(struct connection *_conn, const char *const *args)
                container_of(_conn, struct master_login_auth, conn);
        unsigned int id;
 
+       if (args[0] != NULL && strcmp(args[0], "CUID") == 0) {
+               i_error("%s is an auth client socket. "
+                       "It should be a master socket.",
+                       auth->auth_socket_path);
+               return -1;
+       }
+
        if (args[0] == NULL || args[1] == NULL ||
            str_to_uint(args[1], &id) < 0) {
                i_error("BUG: Unexpected input: %s",