s3:smbd: Add a "hidden" parameter "share:fake_fscaps"
authorVolker Lendecke <vl@samba.org>
Wed, 9 Sep 2009 19:58:47 +0000 (21:58 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 9 Sep 2009 20:03:22 +0000 (22:03 +0200)
This is needed to support some special app I've just come across where I had to
set the SPARSE_FILES bit (0x40) to make it work against Samba at all. There
might be others to fake. This is definitely a "Don't touch if you don't know
what you're doing" thing, so I decided to make this an undocumented parametric
parameter.

I know this sucks, so feel free to beat me up on this. But I don't think it
will hurt.

source3/smbd/trans2.c

index da23697771d442cc77bf5cd03ab4bfe4143ec981..73873e09a3cb3ac97d022f430fbc153f299e836b 100644 (file)
@@ -2982,6 +2982,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_ex_dev, (u
 
                        /* Capabilities are filled in at connection time through STATVFS call */
                        additional_flags |= conn->fs_capabilities;
+                       additional_flags |= lp_parm_int(conn->params->service,
+                                                       "share", "fake_fscaps",
+                                                       0);
 
                        SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH|
                                FILE_SUPPORTS_OBJECT_IDS|FILE_UNICODE_ON_DISK|