From 34305d74e19e09d304db4bfe7fcd46504831feaf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 30 Aug 2005 17:23:07 +0000 Subject: r9808: Improve code that selects what "passdb backend" to import from. (This used to be commit 7739d092d5ca99bd44a1612cc783e38a2f09a67f) --- source4/lib/samba3/smbpasswd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib/samba3/smbpasswd.c') diff --git a/source4/lib/samba3/smbpasswd.c b/source4/lib/samba3/smbpasswd.c index 5976d2db572..fe0780c8d31 100644 --- a/source4/lib/samba3/smbpasswd.c +++ b/source4/lib/samba3/smbpasswd.c @@ -219,6 +219,11 @@ NTSTATUS samba3_read_smbpasswd(const char *filename, TALLOC_CTX *ctx, struct sam lines = file_lines_load(filename, &numlines, ctx); + if (lines == NULL) { + DEBUG(0, ("Unable to load lines from %s\n", filename)); + return NT_STATUS_UNSUCCESSFUL; + } + *accounts = talloc_array(ctx, struct samba3_samaccount, numlines); for (i = 0; i < numlines; i++) { -- cgit v1.2.1