changeset 9529:4b0ec8160ff4 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 142c935e44d6
children 3237519b73f4
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	Fri Jan 22 18:58:51 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	Fri Jan 22 18:58:51 2010 +0200
+++ b/src/auth/userdb-passwd-file.c	Sun Jan 24 22:58:45 2010 +0200
@@ -93,6 +93,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;