changeset 12326:760d84e274ad

dsync: Don't crash if USER environment isn't set and -u parameter isn't given.
author Timo Sirainen <tss@iki.fi>
date Thu, 21 Oct 2010 16:12:13 +0100
parents ca2f5af61e7d
children 099925543768
files src/dsync/dsync.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 ||