summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-08-13 16:04:21 +0000
committerAndrew Tridgell <tridge@samba.org>2003-08-13 16:04:21 +0000
commit75c0125fb71b0562e7bdd85c391764796b5f12f6 (patch)
treeb589d2e6bbc2c517a3f79790d0ed309ef79f7507 /source4/include
parenta3b86fe170beb70ffab8585a276ca1648fffd454 (diff)
downloadsamba-75c0125fb71b0562e7bdd85c391764796b5f12f6.tar.gz
samba-75c0125fb71b0562e7bdd85c391764796b5f12f6.tar.bz2
samba-75c0125fb71b0562e7bdd85c391764796b5f12f6.zip
- added SMBntrename test suite
- allow username of form DOMAIN\username or DOMAIN/username - added ntrename to gentest (This used to be commit 2b464472c17b791eb5b117f89d5aaea2bf60f6ad)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/ntvfs.h2
-rw-r--r--source4/include/smb.h6
-rw-r--r--source4/include/smb_interfaces.h35
3 files changed, 37 insertions, 6 deletions
diff --git a/source4/include/ntvfs.h b/source4/include/ntvfs.h
index edec2a7e53..2b1f519b32 100644
--- a/source4/include/ntvfs.h
+++ b/source4/include/ntvfs.h
@@ -44,7 +44,7 @@ struct ntvfs_ops {
NTSTATUS (*open)(struct request_context *req, union smb_open *oi);
NTSTATUS (*mkdir)(struct request_context *req, union smb_mkdir *md);
NTSTATUS (*rmdir)(struct request_context *req, struct smb_rmdir *rd);
- NTSTATUS (*rename)(struct request_context *req, struct smb_rename *ren);
+ NTSTATUS (*rename)(struct request_context *req, union smb_rename *ren);
NTSTATUS (*copy)(struct request_context *req, struct smb_copy *cp);
/* directory search */
diff --git a/source4/include/smb.h b/source4/include/smb.h
index 682d392c0f..931f4793c9 100644
--- a/source4/include/smb.h
+++ b/source4/include/smb.h
@@ -883,6 +883,7 @@ struct bitmap {
#define SMBnttranss 0xA1 /* NT transact secondary */
#define SMBntcreateX 0xA2 /* NT create and X */
#define SMBntcancel 0xA4 /* NT cancel */
+#define SMBntrename 0xA5 /* NT rename */
/* used to indicate end of chain */
#define SMB_CHAIN_NONE 0xFF
@@ -968,6 +969,11 @@ struct bitmap {
/* Flag for NT transact rename call. */
#define RENAME_REPLACE_IF_EXISTS 1
+/* flags for SMBntrename call */
+#define RENAME_FLAG_HARD_LINK 0x103
+#define RENAME_FLAG_RENAME 0x104
+#define RENAME_FLAG_COPY 0x105
+
/* Filesystem Attributes. */
#define FILE_CASE_SENSITIVE_SEARCH 0x01
#define FILE_CASE_PRESERVED_NAMES 0x02
diff --git a/source4/include/smb_interfaces.h b/source4/include/smb_interfaces.h
index 70cff11395..f010883f18 100644
--- a/source4/include/smb_interfaces.h
+++ b/source4/include/smb_interfaces.h
@@ -125,12 +125,37 @@ struct smb_rmdir {
};
/* struct used in rename() call */
-struct smb_rename {
+enum rename_level {RAW_RENAME_RENAME, RAW_RENAME_NTRENAME};
+
+union smb_rename {
struct {
- const char *pattern1;
- const char *pattern2;
- uint16 attrib;
- } in;
+ enum rename_level level;
+ } generic;
+
+ /* SMBrename interface */
+ struct {
+ enum rename_level level;
+
+ struct {
+ const char *pattern1;
+ const char *pattern2;
+ uint16 attrib;
+ } in;
+ } rename;
+
+
+ /* SMBntrename interface */
+ struct {
+ enum rename_level level;
+
+ struct {
+ uint16 attrib;
+ uint16 flags; /* see RENAME_FLAG_* */
+ uint32 root_fid; /* is it? */
+ const char *old_name;
+ const char *new_name;
+ } in;
+ } ntrename;
};
enum tcon_level {RAW_TCON_TCON, RAW_TCON_TCONX};