svn commit: samba r15660 - branches/SAMBA_3_0/source/smbd trunk/source/smbd

vlendec at samba.org vlendec at samba.org
Wed May 17 15:01:57 GMT 2006


Author: vlendec
Date: 2006-05-17 15:01:57 +0000 (Wed, 17 May 2006)
New Revision: 15660

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15660

Log:
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?\195?\188ltig
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

Modified:
   branches/SAMBA_3_0/source/smbd/close.c
   branches/SAMBA_3_0/source/smbd/fake_file.c
   trunk/source/smbd/close.c
   trunk/source/smbd/fake_file.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/close.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/close.c	2006-05-17 13:58:53 UTC (rev 15659)
+++ branches/SAMBA_3_0/source/smbd/close.c	2006-05-17 15:01:57 UTC (rev 15660)
@@ -447,6 +447,8 @@
 		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);
 }

Modified: branches/SAMBA_3_0/source/smbd/fake_file.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/fake_file.c	2006-05-17 13:58:53 UTC (rev 15659)
+++ branches/SAMBA_3_0/source/smbd/fake_file.c	2006-05-17 15:01:57 UTC (rev 15660)
@@ -156,3 +156,9 @@
 	talloc_destroy((*fh)->mem_ctx);
 	(*fh) = NULL;
 }
+
+int close_fake_file(files_struct *fsp)
+{
+	file_free(fsp);
+	return 0;
+}

Modified: trunk/source/smbd/close.c
===================================================================
--- trunk/source/smbd/close.c	2006-05-17 13:58:53 UTC (rev 15659)
+++ trunk/source/smbd/close.c	2006-05-17 15:01:57 UTC (rev 15660)
@@ -447,6 +447,8 @@
 		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);
 }

Modified: trunk/source/smbd/fake_file.c
===================================================================
--- trunk/source/smbd/fake_file.c	2006-05-17 13:58:53 UTC (rev 15659)
+++ trunk/source/smbd/fake_file.c	2006-05-17 15:01:57 UTC (rev 15660)
@@ -158,3 +158,9 @@
 	talloc_destroy((*fh)->mem_ctx);
 	(*fh) = NULL;
 }
+
+int close_fake_file(files_struct *fsp)
+{
+	file_free(fsp);
+	return 0;
+}



More information about the samba-cvs mailing list