s3: Make is_executable() available in lib/
authorVolker Lendecke <vl@samba.org>
Fri, 29 Jul 2011 14:14:39 +0000 (16:14 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 29 Jul 2011 14:43:17 +0000 (16:43 +0200)
source3/include/proto.h
source3/lib/util.c
source3/smbd/open.c
source3/smbd/proto.h

index 35c26c2bb14bea5a69127ebedeb24348126ac446..9eff02606d88e4c8e67a5b7aecdee8cd1245ab66 100644 (file)
@@ -606,6 +606,7 @@ bool tevent_req_poll_ntstatus(struct tevent_req *req,
 bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result);
 int timeval_to_msec(struct timeval t);
 char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
+bool is_executable(const char *fname);
 
 /* The following definitions come from lib/util_cmdline.c  */
 
index b8fc319a6ff4dacd853b16bc3b5a319205b7e3b5..b320931146b3d0c21eb791e1bf0d7adbf61107d6 100644 (file)
@@ -2238,3 +2238,20 @@ char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname)
 
        return ptr;
 }
+
+/*******************************************************************
+ Return True if the filename is one of the special executable types.
+********************************************************************/
+
+bool is_executable(const char *fname)
+{
+       if ((fname = strrchr_m(fname,'.'))) {
+               if (strequal(fname,".com") ||
+                   strequal(fname,".dll") ||
+                   strequal(fname,".exe") ||
+                   strequal(fname,".sym")) {
+                       return True;
+               }
+       }
+       return False;
+}
index 82125832cbc8fa972144f245643f38c056a02cf0..2529cbe0ce68cd6306a136b5c5860091fa89a06f 100644 (file)
@@ -698,23 +698,6 @@ static NTSTATUS open_file(files_struct *fsp,
        return NT_STATUS_OK;
 }
 
-/*******************************************************************
- Return True if the filename is one of the special executable types.
-********************************************************************/
-
-bool is_executable(const char *fname)
-{
-       if ((fname = strrchr_m(fname,'.'))) {
-               if (strequal(fname,".com") ||
-                   strequal(fname,".dll") ||
-                   strequal(fname,".exe") ||
-                   strequal(fname,".sym")) {
-                       return True;
-               }
-       }
-       return False;
-}
-
 /****************************************************************************
  Check if we can open a file with a share mode.
  Returns True if conflict, False if not.
index 763a946a160d6100c454b61db3bc5fd918f8ca46..02c82f7d2ae3aeafe5f82af7567fd3b326f44735 100644 (file)
@@ -589,7 +589,6 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
                                    const char *inherit_from_dir,
                                    const char *fname,
                                    SMB_STRUCT_STAT *psbuf);
-bool is_executable(const char *fname);
 bool is_stat_open(uint32 access_mask);
 bool request_timed_out(struct timeval request_time,
                       struct timeval timeout);