fake_files broken in 3.0.6-3.0.7

Stefan (metze) Metzmacher metze at samba.org
Fri Sep 17 15:16:30 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Jerry, Jeremy,

can someone of you please check if this patch is correct to
readd quota management support, which is broken because the client can't open the magic quota fake
file anymore...

thanks



- --
metze

Stefan Metzmacher <metze at samba.org> www.samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBSv/Nm70gjA5TCD8RAgfcAJwLvWK+DuHlsoCC0g0ehVcxggB1uACfdfFf
iQiOCL/nGUL4kBO0eWtO57s=
=vxKJ
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: source/smbd/nttrans.c
===================================================================
--- source/smbd/nttrans.c	(revision 2387)
+++ source/smbd/nttrans.c	(working copy)
@@ -762,13 +762,14 @@
 	set_posix_case_semantics(conn, file_attributes);
 		
 	unix_convert(fname,conn,0,&bad_path,&sbuf);
-	if (bad_path) {
+	/* FAKE_FILE are special cases */
+	if ((fake_file_type == FAKE_FILE_TYPE_NONE) && bad_path) {
 		restore_case_semantics(conn, file_attributes);
 		END_PROFILE(SMBntcreateX);
 		return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
 	}
 	/* All file access must go through check_name() */
-	if (!check_name(fname,conn)) {
+	if ((fake_file_type == FAKE_FILE_TYPE_NONE) && !check_name(fname,conn)) {
 		restore_case_semantics(conn, file_attributes);
 		END_PROFILE(SMBntcreateX);
 		return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);


More information about the samba-technical mailing list