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)
committerKarolin Seeger <kseeger@samba.org>
Tue, 8 Dec 2009 08:15:08 +0000 (09:15 +0100)
(cherry picked from commit f216509a4004cc3d7920e9ef25160222166299a6)

source3/include/proto.h
source3/lib/util.c
source3/utils/testparm.c

index b3f98ad39ca4a49bdd322b53bc96e5ebf938716c..1d6b5f0f594e56547284f91aba21bc6328f854fb 100644 (file)
@@ -1124,7 +1124,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 8e04bcdb4eb8be296b0757c2edcc5aa6d4e7d6b4..5fe7bce144e94ac3cdde16f41c04ce0be02b0b83 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.