]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Die if system hostname contains '/' character.
authorTimo Sirainen <tss@iki.fi>
Tue, 25 May 2010 15:31:39 +0000 (16:31 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 25 May 2010 15:31:39 +0000 (16:31 +0100)
--HG--
branch : HEAD

src/lib/hostpid.c

index c9850458eb9deeb4b0011ecaf3d0773bcd6a2130..1e84c247be0c77ab3e3f893fb038b02b04041b8e 100644 (file)
@@ -20,6 +20,9 @@ void hostpid_init(void)
        hostname[sizeof(hostname)-1] = '\0';
        my_hostname = hostname;
 
+       if (strchr(hostname, '/') != NULL)
+               i_fatal("Invalid system hostname: %s", hostname);
+
        /* allow calling hostpid_init() multiple times to reset hostname */
        i_free_and_null(my_domain);