dovecot-2.0: dsync: Don't crash if USER environment isn't set an...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 21 18:12:19 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/760d84e274ad
changeset: 12326:760d84e274ad
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 21 16:12:13 2010 +0100
description:
dsync: Don't crash if USER environment isn't set and -u parameter isn't given.

diffstat:

 src/dsync/dsync.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r ca2f5af61e7d -r 760d84e274ad src/dsync/dsync.c
--- a/src/dsync/dsync.c	Wed Oct 20 19:32:16 2010 +0100
+++ b/src/dsync/dsync.c	Thu Oct 21 16:12:13 2010 +0100
@@ -206,6 +206,8 @@
 	}
 	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 ||


More information about the dovecot-cvs mailing list