diff -urNp rssh-2.3.2/util.c~ rssh-2.3.2/util.c
--- rssh-2.3.2/util.c~	2008-03-11 16:04:36.000000000 -0400
+++ rssh-2.3.2/util.c	2008-03-11 16:04:36.000000000 -0400
@@ -134,7 +134,7 @@ bool opt_exist(char *cl, char opt)
 {
 	int	i = 0;
 	int	len;
-	char	*token;
+/*	char	*token; */
 	bool	optstring = FALSE;
 
 
@@ -229,11 +229,22 @@ char *check_command_line( char *cl, Shel
 	}
 
 	if ( check_command(cl, opts, PATH_RSYNC, RSSH_ALLOW_RSYNC) ){
-		/* filter -e option */
-		if ( opt_exist(cl, 'e') ){
-			fprintf(stderr, "\ninsecure -e option not allowed.");
-			log_msg("insecure -e option in rdist command line!");
-			return NULL;
+		/* Under rsync 3.x, when --server is present and --daemon isn't,
+		   -e is used to convey subprotocol info. We have to allow -e then. */
+		if ( strstr(cl, "--server" ) ){
+			if ( opt_exist(cl, 'e') ){
+				if( strstr(cl, "--daemon") ) {
+					fprintf(stderr, "\ninsecure -e option not allowed with --server and --daemon.");
+					log_msg("insecure -e option in rsync command line!");
+					return NULL;
+				}
+			}
+		} else {
+			if ( opt_exist(cl, 'e') ){
+				fprintf(stderr, "\ninsecure -e option not allowed.");
+				log_msg("insecure -e option in rsync command line!");
+				return NULL;
+			}
 		}
 		
 		if ( strstr(cl, "--rsh=" ) ){
