changeset 10574:354d3b1eee03 HEAD

passwd-file: Give a better error message if args (path) is empty.
author Timo Sirainen <tss@iki.fi>
date Sun, 24 Jan 2010 22:58:45 +0200
parents 823356f533c5
children f8ab17253dff
files src/auth/passdb-passwd-file.c src/auth/userdb-passwd-file.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/passdb-passwd-file.c	Sat Jan 23 12:40:22 2010 +0200
+++ b/src/auth/passdb-passwd-file.c	Sun Jan 24 22:58:45 2010 +0200
@@ -143,6 +143,9 @@
 			i_fatal("passdb passwd-file: Unknown setting: %s", key);
 	}
 
+	if (*args == '\0')
+		i_fatal("passdb passwd-file: Missing args");
+
 	module = p_new(auth_passdb->auth->pool,
 		       struct passwd_file_passdb_module, 1);
 	module->auth = auth_passdb->auth;
--- a/src/auth/userdb-passwd-file.c	Sat Jan 23 12:40:22 2010 +0200
+++ b/src/auth/userdb-passwd-file.c	Sun Jan 24 22:58:45 2010 +0200
@@ -174,6 +174,9 @@
 		}
 	}
 
+	if (*args == '\0')
+		i_fatal("userdb passwd-file: Missing args");
+
 	module = p_new(auth_userdb->auth->pool,
 		       struct passwd_file_userdb_module, 1);
 	module->auth = auth_userdb->auth;