HACK pass s4 create_action...
authorMichael Adam <obnox@samba.org>
Thu, 9 Aug 2012 10:18:14 +0000 (12:18 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 13 Aug 2018 15:34:53 +0000 (17:34 +0200)
source4/ntvfs/common/opendb_tdb.c
source4/ntvfs/posix/pvfs_open.c

index ce270b41273d5ec7c0e6e96089100feef65bb11c..cb0b5c4539c2e8aa85191f8bb3b4fe88c9ed11f5 100644 (file)
@@ -435,6 +435,7 @@ static NTSTATUS odb_tdb_open_can_internal(struct odb_context *odb,
 static NTSTATUS odb_tdb_open_file(struct odb_lock *lck,
                                  void *file_handle, const char *path,
                                  int *fd, NTTIME open_write_time,
+                                 uint32_t create_action,
                                  bool allow_level_II_oplock,
                                  uint32_t oplock_level, uint32_t *oplock_granted)
 {
@@ -511,6 +512,10 @@ static NTSTATUS odb_tdb_open_file(struct odb_lock *lck,
                }
        }
 
+       if (lck->file.num_entries == 0) {
+               lck->file.create_action = create_action;
+       }
+
        /* it doesn't conflict, so add it to the end */
        lck->file.entries = talloc_realloc(lck, lck->file.entries,
                                           struct opendb_entry,
index 48d2712315f55ca3801f18aaf9ce9205767271bf..c75739daa511e4d71632c6f03b3ca547d49a7d5a 100644 (file)
@@ -812,7 +812,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
 
        status = odb_open_file(lck, f->handle, name->full_name,
                               &f->handle->fd, name->dos.write_time,
-                              allow_level_II_oplock,
+                              allow_level_II_oplock, was_created,
                               oplock_level, &oplock_granted);
        talloc_free(lck);
        if (!NT_STATUS_IS_OK(status)) {