s3: Move directory_exist_stat to testparm.c, it only looks at the mode
authorVolker Lendecke <vl@samba.org>
Fri, 27 Nov 2009 12:19:30 +0000 (13:19 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 29 Nov 2009 10:22:04 +0000 (11:22 +0100)
source3/include/proto.h
source3/lib/util.c
source3/utils/testparm.c

index 23b7f66257f6f97441aa4688898fd41f41dc5517..a2d0397d4efe873f39cc35f70a06355336d9c104 100644 (file)
@@ -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);
index b074a1bd6ccd8d6882bcffd6195aab8cefc22a08..8525d9c919e9f497befd6a2dcfca89f113f5a170 100644 (file)
@@ -553,27 +553,6 @@ bool socket_exist(const char *fname)
        return S_ISSOCK(st.st_ex_mode);
 }
 
-/*******************************************************************
- 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.
 ********************************************************************/
index 55c9cc16cf72cc34ba2b92d2dc487229ab296bae..3204de27d431b30fa2251081678302f9c6684746 100644 (file)
 
 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.