s3: Move is_ntfs_stream*() to filename.c
authorTim Prouty <tprouty@samba.org>
Fri, 10 Jul 2009 22:10:35 +0000 (15:10 -0700)
committerTim Prouty <tprouty@samba.org>
Tue, 21 Jul 2009 00:26:57 +0000 (17:26 -0700)
source3/include/proto.h
source3/smbd/filename.c
source3/smbd/nttrans.c

index 830d2284c482525768263d0344ce1b5d0662c11d..cdc58437f00f33ee50d84f5d6145c4e060c13652 100644 (file)
@@ -6325,6 +6325,8 @@ const char *smb_fname_str_dbg(const struct smb_filename *smb_fname);
 NTSTATUS copy_smb_filename(TALLOC_CTX *ctx,
                           const struct smb_filename *smb_fname_in,
                           struct smb_filename **smb_fname_out);
+bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname);
+bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname);
 NTSTATUS unix_convert(TALLOC_CTX *ctx,
                      connection_struct *conn,
                      const char *orig_path,
@@ -6548,8 +6550,6 @@ void send_nt_replies(connection_struct *conn,
                        struct smb_request *req, NTSTATUS nt_error,
                     char *params, int paramsize,
                     char *pdata, int datasize);
-bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname);
-bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname);
 void reply_ntcreate_and_X(struct smb_request *req);
 void reply_ntcancel(struct smb_request *req);
 void reply_ntrename(struct smb_request *req);
index 29ebc37d1a75a90576082a025c0f57d463a75e20..1eb6ce5065fa9b65e334fd76764928fcaf1bcc15 100644 (file)
@@ -275,6 +275,30 @@ NTSTATUS copy_smb_filename(TALLOC_CTX *ctx,
        return NT_STATUS_NO_MEMORY;
 }
 
+/****************************************************************************
+ Simple check to determine if the filename is a stream.
+ ***************************************************************************/
+bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname)
+{
+       if (lp_posix_pathnames()) {
+               return false;
+       }
+
+       return smb_fname->stream_name;
+}
+
+/****************************************************************************
+ Returns true if the filename's stream == "::$DATA"
+ ***************************************************************************/
+bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname)
+{
+       if (!is_ntfs_stream_smb_fname(smb_fname)) {
+               return false;
+       }
+
+       return StrCaseCmp(smb_fname->stream_name, "::$DATA") == 0;
+}
+
 /****************************************************************************
 This routine is called to convert names from the dos namespace to unix
 namespace. It needs to handle any case conversions, mangling, format changes,
index ff76b7a21f46af121278908a99888b30cb9903eb..ecb88296cad4855bd7e57e72ccdea11e30a058e2 100644 (file)
@@ -271,30 +271,6 @@ void send_nt_replies(connection_struct *conn,
        }
 }
 
-/****************************************************************************
- Simple check to determine if the filename is a stream.
- ***************************************************************************/
-bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname)
-{
-       if (lp_posix_pathnames()) {
-               return false;
-       }
-
-       return smb_fname->stream_name;
-}
-
-/****************************************************************************
- Returns true if the filename's stream == "::$DATA"
- ***************************************************************************/
-bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname)
-{
-       if (!is_ntfs_stream_smb_fname(smb_fname)) {
-               return false;
-       }
-
-       return StrCaseCmp(smb_fname->stream_name, "::$DATA") == 0;
-}
-
 /****************************************************************************
  Reply to an NT create and X call on a pipe
 ****************************************************************************/