summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-27 13:19:30 +0100
committerVolker Lendecke <vl@samba.org>2009-11-29 11:22:04 +0100
commit36e8d8ed455ab712023ddc199beaeb01e4d40ff2 (patch)
treecd50b7182b58ba91e6f553f655db0ac3603efabd /source3
parent33601b8632edf65af4d4ab787c5615ab5c6af6fb (diff)
downloadsamba-36e8d8ed455ab712023ddc199beaeb01e4d40ff2.tar.gz
samba-36e8d8ed455ab712023ddc199beaeb01e4d40ff2.tar.bz2
samba-36e8d8ed455ab712023ddc199beaeb01e4d40ff2.zip
s3: Move directory_exist_stat to testparm.c, it only looks at the mode
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util.c21
-rw-r--r--source3/utils/testparm.c21
3 files changed, 21 insertions, 22 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 23b7f66257..a2d0397d4e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1122,7 +1122,6 @@ void set_cmdline_auth_info_getpass(struct user_auth_info *auth_info);
bool file_exist_stat(const char *fname,SMB_STRUCT_STAT *sbuf,
bool fake_dir_create_times);
bool socket_exist(const char *fname);
-bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st);
uint64_t get_file_size_stat(const SMB_STRUCT_STAT *sbuf);
SMB_OFF_T get_file_size(char *file_name);
char *attrib_string(uint16 mode);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b074a1bd6c..8525d9c919 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -554,27 +554,6 @@ bool socket_exist(const char *fname)
}
/*******************************************************************
- Check if a directory exists.
-********************************************************************/
-
-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, lp_fake_dir_create_times()) != 0)
- return(False);
-
- ret = S_ISDIR(st->st_ex_mode);
- if(!ret)
- errno = ENOTDIR;
- return ret;
-}
-
-/*******************************************************************
Returns the size in bytes of the named given the stat struct.
********************************************************************/
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.