summaryrefslogtreecommitdiff
path: root/source3/utils/testparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/testparm.c')
-rw-r--r--source3/utils/testparm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 55c9cc16cf..3204de27d4 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -35,6 +35,27 @@
extern bool AllowDebugChange;
+/*******************************************************************
+ Check if a directory exists.
+********************************************************************/
+
+static bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st)
+{
+ SMB_STRUCT_STAT st2;
+ bool ret;
+
+ if (!st)
+ st = &st2;
+
+ if (sys_stat(dname, st, false) != 0)
+ return(False);
+
+ ret = S_ISDIR(st->st_ex_mode);
+ if(!ret)
+ errno = ENOTDIR;
+ return ret;
+}
+
/***********************************************
Here we do a set of 'hard coded' checks for bad
configuration settings.