]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Don't crash if USER environment isn't set and -u parameter isn't given.
authorTimo Sirainen <tss@iki.fi>
Thu, 21 Oct 2010 15:12:13 +0000 (16:12 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 21 Oct 2010 15:12:13 +0000 (16:12 +0100)
src/dsync/dsync.c

index 3a6c4b2737bd66bdf294dc6f2867cf43e9e7a16d..a3a8fcca4bcc2fb0799478c8f3d406e9f1e5e64a 100644 (file)
@@ -206,6 +206,8 @@ int main(int argc, char *argv[])
        }
        if (optind == argc)
                usage();
+       if (username == NULL)
+               i_fatal("USER environment not set and -u parameter not given");
        cmd_name = argv[optind++];
 
        if (strcmp(cmd_name, "mirror") == 0 ||