summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-11-29 12:00:24 +0100
committerStefan Metzmacher <metze@samba.org>2014-01-07 08:37:38 +0100
commit306cba4b8c3bcf5aa1e13296eaebbe212bb35a48 (patch)
tree3e4c3ef748007dfde57229063953e61f582325d8
parent54c0bde3e98059db8faa26c967c804143e679c8e (diff)
libcli/smb: move some FILE_* flags to smb_constants.h
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--libcli/smb/smb_constants.h50
-rw-r--r--source3/include/smb.h51
-rw-r--r--source4/libcli/raw/smb.h16
3 files changed, 50 insertions, 67 deletions
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index b38c489b10..c2133e0744 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -383,6 +383,56 @@ enum csc_policy {
#define FILE_NAMED_STREAMS 0x00040000
#define FILE_READ_ONLY_VOLUME 0x00080000
+/* ShareAccess field. */
+#define FILE_SHARE_NONE 0 /* Cannot be used in bitmask. */
+#define FILE_SHARE_READ 1
+#define FILE_SHARE_WRITE 2
+#define FILE_SHARE_DELETE 4
+
+/* Flags - combined with attributes. */
+#define FILE_FLAG_WRITE_THROUGH 0x80000000L
+#define FILE_FLAG_NO_BUFFERING 0x20000000L
+#define FILE_FLAG_RANDOM_ACCESS 0x10000000L
+#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000L
+#define FILE_FLAG_DELETE_ON_CLOSE 0x04000000L
+#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L
+#define FILE_FLAG_POSIX_SEMANTICS 0x01000000L
+
+/* CreateDisposition field. */
+#define FILE_SUPERSEDE 0 /* File exists overwrite/supersede. File not exist create. */
+#define FILE_OPEN 1 /* File exists open. File not exist fail. */
+#define FILE_CREATE 2 /* File exists fail. File not exist create. */
+#define FILE_OPEN_IF 3 /* File exists open. File not exist create. */
+#define FILE_OVERWRITE 4 /* File exists overwrite. File not exist fail. */
+#define FILE_OVERWRITE_IF 5 /* File exists overwrite. File not exist create. */
+
+/* CreateOptions field. */
+#define FILE_DIRECTORY_FILE 0x0001
+#define FILE_WRITE_THROUGH 0x0002
+#define FILE_SEQUENTIAL_ONLY 0x0004
+#define FILE_NO_INTERMEDIATE_BUFFERING 0x0008
+#define FILE_SYNCHRONOUS_IO_ALERT 0x0010 /* may be ignored */
+#define FILE_SYNCHRONOUS_IO_NONALERT 0x0020 /* may be ignored */
+#define FILE_NON_DIRECTORY_FILE 0x0040
+#define FILE_CREATE_TREE_CONNECTION 0x0080 /* ignore, should be zero */
+#define FILE_COMPLETE_IF_OPLOCKED 0x0100 /* ignore, should be zero */
+#define FILE_NO_EA_KNOWLEDGE 0x0200
+#define FILE_EIGHT_DOT_THREE_ONLY 0x0400 /* aka OPEN_FOR_RECOVERY: ignore, should be zero */
+#define FILE_RANDOM_ACCESS 0x0800
+#define FILE_DELETE_ON_CLOSE 0x1000
+#define FILE_OPEN_BY_FILE_ID 0x2000
+#define FILE_OPEN_FOR_BACKUP_INTENT 0x4000
+#define FILE_NO_COMPRESSION 0x8000
+#define FILE_RESERVER_OPFILTER 0x00100000 /* ignore, should be zero */
+#define FILE_OPEN_REPARSE_POINT 0x00200000
+#define FILE_OPEN_NO_RECALL 0x00400000
+#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 /* ignore should be zero */
+
+/* Responses when opening a file. */
+#define FILE_WAS_SUPERSEDED 0
+#define FILE_WAS_OPENED 1
+#define FILE_WAS_CREATED 2
+#define FILE_WAS_OVERWRITTEN 3
/* ioctl codes */
#define IOCTL_QUERY_JOB_INFO 0x530060
diff --git a/source3/include/smb.h b/source3/include/smb.h
index aae510d3c2..2b3b730469 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -435,51 +435,6 @@ Offset Data length.
#define OPEN_DIRECTORY 8
#define EXTENDED_RESPONSE_REQUIRED 0x10
-/* ShareAccess field. */
-#define FILE_SHARE_NONE 0 /* Cannot be used in bitmask. */
-#define FILE_SHARE_READ 1
-#define FILE_SHARE_WRITE 2
-#define FILE_SHARE_DELETE 4
-
-/* Flags - combined with attributes. */
-#define FILE_FLAG_WRITE_THROUGH 0x80000000L
-#define FILE_FLAG_NO_BUFFERING 0x20000000L
-#define FILE_FLAG_RANDOM_ACCESS 0x10000000L
-#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000L
-#define FILE_FLAG_DELETE_ON_CLOSE 0x04000000L
-#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L
-#define FILE_FLAG_POSIX_SEMANTICS 0x01000000L
-
-/* CreateDisposition field. */
-#define FILE_SUPERSEDE 0 /* File exists overwrite/supersede. File not exist create. */
-#define FILE_OPEN 1 /* File exists open. File not exist fail. */
-#define FILE_CREATE 2 /* File exists fail. File not exist create. */
-#define FILE_OPEN_IF 3 /* File exists open. File not exist create. */
-#define FILE_OVERWRITE 4 /* File exists overwrite. File not exist fail. */
-#define FILE_OVERWRITE_IF 5 /* File exists overwrite. File not exist create. */
-
-/* CreateOptions field. */
-#define FILE_DIRECTORY_FILE 0x0001
-#define FILE_WRITE_THROUGH 0x0002
-#define FILE_SEQUENTIAL_ONLY 0x0004
-#define FILE_NO_INTERMEDIATE_BUFFERING 0x0008
-#define FILE_SYNCHRONOUS_IO_ALERT 0x0010 /* may be ignored */
-#define FILE_SYNCHRONOUS_IO_NONALERT 0x0020 /* may be ignored */
-#define FILE_NON_DIRECTORY_FILE 0x0040
-#define FILE_CREATE_TREE_CONNECTION 0x0080 /* ignore, should be zero */
-#define FILE_COMPLETE_IF_OPLOCKED 0x0100 /* ignore, should be zero */
-#define FILE_NO_EA_KNOWLEDGE 0x0200
-#define FILE_EIGHT_DOT_THREE_ONLY 0x0400 /* aka OPEN_FOR_RECOVERY: ignore, should be zero */
-#define FILE_RANDOM_ACCESS 0x0800
-#define FILE_DELETE_ON_CLOSE 0x1000
-#define FILE_OPEN_BY_FILE_ID 0x2000
-#define FILE_OPEN_FOR_BACKUP_INTENT 0x4000
-#define FILE_NO_COMPRESSION 0x8000
-#define FILE_RESERVER_OPFILTER 0x00100000 /* ignore, should be zero */
-#define FILE_OPEN_REPARSE_POINT 0x00200000
-#define FILE_OPEN_NO_RECALL 0x00400000
-#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 /* ignore should be zero */
-
#define NTCREATEX_OPTIONS_MUST_IGNORE_MASK (0x008F0480)
#define NTCREATEX_OPTIONS_INVALID_PARAM_MASK (0xFF100030)
@@ -498,12 +453,6 @@ Offset Data length.
/* Private options for printer support */
#define NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE 0x0008
-/* Responses when opening a file. */
-#define FILE_WAS_SUPERSEDED 0
-#define FILE_WAS_OPENED 1
-#define FILE_WAS_CREATED 2
-#define FILE_WAS_OVERWRITTEN 3
-
/* Flag for NT transact rename call. */
#define RENAME_REPLACE_IF_EXISTS 1
diff --git a/source4/libcli/raw/smb.h b/source4/libcli/raw/smb.h
index 38aefb6745..7fbbd0c0c3 100644
--- a/source4/libcli/raw/smb.h
+++ b/source4/libcli/raw/smb.h
@@ -226,22 +226,6 @@
/* the desired access to use when opening a pipe */
#define DESIRED_ACCESS_PIPE 0x2019f
-
-/* Flags - combined with attributes. */
-#define FILE_FLAG_WRITE_THROUGH 0x80000000L
-#define FILE_FLAG_NO_BUFFERING 0x20000000L
-#define FILE_FLAG_RANDOM_ACCESS 0x10000000L
-#define FILE_FLAG_SEQUENTIAL_SCAN 0x08000000L
-#define FILE_FLAG_DELETE_ON_CLOSE 0x04000000L
-#define FILE_FLAG_BACKUP_SEMANTICS 0x02000000L /* only if backup/restore privilege? */
-#define FILE_FLAG_POSIX_SEMANTICS 0x01000000L
-
-/* Responses when opening a file. */
-#define FILE_WAS_SUPERSEDED 0
-#define FILE_WAS_OPENED 1
-#define FILE_WAS_CREATED 2
-#define FILE_WAS_OVERWRITTEN 3
-
/* Flag for NT transact rename call. */
#define RENAME_REPLACE_IF_EXISTS 1