]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Make is_executable() available in lib/
authorVolker Lendecke <vl@samba.org>
Fri, 29 Jul 2011 14:14:39 +0000 (16:14 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 16 Sep 2011 18:40:21 +0000 (20:40 +0200)
(cherry picked from commit eb7a5a708ee39f3284983055a39889c98463366f)

source3/include/proto.h
source3/lib/util.c
source3/smbd/open.c
source3/smbd/proto.h

index 393dd77a36ffe62482728d65c56fcb80d0655a9e..e7d658fa2eb329d859bc52ff7fa3118621bf8fc7 100644 (file)
@@ -705,6 +705,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 b4c91af098d11b4cfcf8cb34f007ccbdaaaf4a98..53ea0e087ead1503e07e6245d4cfaf413b40f781 100644 (file)
@@ -2722,3 +2722,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 9b36c6c355aa4ba081d6a761b99d39baec563ac5..1f90c621e0992d605895ed2b299473859cf6f257 100644 (file)
@@ -697,23 +697,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 55655c50ad867b0a7d25ff312e411596374d0f9e..6e81371536231ce560211f76de9222283b1c0799 100644 (file)
@@ -586,7 +586,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);