summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-05-17 15:01:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:06 -0500
commitc91a675ac108f48046ce72287c6d70a1a54ef65f (patch)
treec1e62ae11596c6428d075dad6cd9062b598f69a1 /source3
parenta8352092789e618e165318ff5f62099341dc6035 (diff)
downloadsamba-c91a675ac108f48046ce72287c6d70a1a54ef65f.tar.gz
samba-c91a675ac108f48046ce72287c6d70a1a54ef65f.tar.bz2
samba-c91a675ac108f48046ce72287c6d70a1a54ef65f.zip
r15660: Without this when using smbcquotas I get
close fd=-1 fnum=4321 (numopen=1) close_file: Could not get share mode lock for file $Extend/$Quota:$Q:$INDEX_ALLOCATION unix_error_packet: error string = Das Argument ist ungültig error packet at smbd/reply.c(3325) cmd=4 (SMBclose) NT_STATUS_INVALID_HANDLE so a fake file needs special close handling I think. Jeremy, can you check this? Thanks, Volker (This used to be commit f66b9701b5c6bb6302fa11889adab6902cbaf2e3)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/close.c2
-rw-r--r--source3/smbd/fake_file.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index bc1182032d..f2d54445b9 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -447,6 +447,8 @@ int close_file(files_struct *fsp, enum file_close_type close_type)
return close_directory(fsp, close_type);
else if (fsp->is_stat)
return close_stat(fsp);
+ else if (fsp->fake_file_handle != NULL)
+ return close_fake_file(fsp);
else
return close_normal_file(fsp, close_type);
}
diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c
index 1356baf1a8..b4f1f02b72 100644
--- a/source3/smbd/fake_file.c
+++ b/source3/smbd/fake_file.c
@@ -156,3 +156,9 @@ void destroy_fake_file_handle(FAKE_FILE_HANDLE **fh)
talloc_destroy((*fh)->mem_ctx);
(*fh) = NULL;
}
+
+int close_fake_file(files_struct *fsp)
+{
+ file_free(fsp);
+ return 0;
+}