vfs: remove posix_flags hack, bump interface version to 34
authorRalph Boehme <slow@samba.org>
Sun, 29 Nov 2015 14:55:43 +0000 (15:55 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 1 Dec 2015 22:48:37 +0000 (23:48 +0100)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec  1 23:48:37 CET 2015 on sn-devel-104

source3/include/vfs.h
source3/smbd/reply.c

index d839be466703a8023ebefc95e0e086a91e63015a..17bd8fa63feaa72fadd904888e304ffa055fe830 100644 (file)
 /* Version 33 - Add snapshot create/delete calls */
 /* Version 33 - Add OS X SMB2 AAPL copyfile extension flag to fsp */
 /* Version 33 - Remove notify_watch_fn */
+/* Bump to version 34 - Samba 4.4 will ship with that */
+/* Version 34 - Remove bool posix_open, add uint64_t posix_flags */
 
-#define SMB_VFS_INTERFACE_VERSION 33
+#define SMB_VFS_INTERFACE_VERSION 34
 
 /*
     All intercepted VFS operations must be declared as static functions inside module source
@@ -218,9 +220,6 @@ struct fsp_lease {
        struct smb2_lease lease;
 };
 
-/* VFS ABI stability hack */
-#define posix_flags posix_open
-
 typedef struct files_struct {
        struct files_struct *next, *prev;
        uint64_t fnum;
@@ -258,7 +257,7 @@ typedef struct files_struct {
        bool aio_write_behind;
        bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
        bool delete_on_close;
-       uint8_t posix_flags;
+       uint64_t posix_flags;
        bool is_sparse;
        bool backup_intent; /* Handle was successfully opened with backup intent
                                and opener has privilege to do so. */
index 7c011ccdecba9ac3e833640e14fc95a559d2c932..3fad39b242df3302fa91f263b0273ef70a0d0a7f 100644 (file)
@@ -2669,7 +2669,7 @@ static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
        }
 
        if (S_ISDIR(fsp->fsp_name->st.st_ex_mode)) {
-               if (fsp->posix_flags & (FSP_POSIX_FLAGS_OPEN|FSP_POSIX_FLAGS_RENAME)) {
+               if (fsp->posix_flags & FSP_POSIX_FLAGS_RENAME) {
                        return NT_STATUS_OK;
                }