summaryrefslogtreecommitdiff
path: root/lib/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-12 22:37:24 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-13 14:06:07 +0200
commit43d84aa619be5851acea82bef77164f0dc3e9f7e (patch)
tree4556b08a0226f046df1eb8843efda4e8ca0f66f2 /lib/param
parent4a89361af465227c96b07d009e67689c44b16e4e (diff)
downloadsamba-43d84aa619be5851acea82bef77164f0dc3e9f7e.tar.gz
samba-43d84aa619be5851acea82bef77164f0dc3e9f7e.tar.bz2
samba-43d84aa619be5851acea82bef77164f0dc3e9f7e.zip
lib/param Print error when mkdir of lock path fails
This matches the s3 code for lock_path(). Andrew Bartlett
Diffstat (limited to 'lib/param')
-rw-r--r--lib/param/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/param/util.c b/lib/param/util.c
index a385c4d0f3..3a6a004043 100644
--- a/lib/param/util.c
+++ b/lib/param/util.c
@@ -90,7 +90,9 @@ char *lpcfg_lock_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
trim_string(dname,"","/");
if (!directory_exist(dname)) {
- mkdir(dname,0755);
+ if (!mkdir(dname,0755))
+ DEBUG(1, ("Unable to create directory %s for file %s. "
+ "Error was %s\n", dname, name, strerror(errno)));
}
fname = talloc_asprintf(mem_ctx, "%s/%s", dname, name);