map_share_mode
Jeremy Allison
jeremy at valinux.com
Fri Jun 9 16:13:09 GMT 2000
"Romeril, Alan" wrote:
>
> Nope, still the same error..
>
> [2000/06/09 10:52:03, 0] smbd/nttrans.c:map_share_mode(449)
> map_share_mode: Incorrect value 0 for desired_access to file \
That's because I'm an idiot who can't code for toffee :-(.
The correct patch (this should work :-) follows -
apply to your pristine 2.0.7 source :
Sorry,
Jeremy.
Index: smbd/nttrans.c
===================================================================
RCS file: /data/cvs/samba/source/smbd/nttrans.c,v
retrieving revision 1.59.2.35.2.11
diff -u -w -b -r1.59.2.35.2.11 nttrans.c
--- nttrans.c 2000/04/24 17:27:30 1.59.2.35.2.11
+++ nttrans.c 2000/06/09 19:14:02
@@ -430,15 +430,26 @@
*/
if (smb_open_mode == -1) {
+
if(desired_access == WRITE_DAC_ACCESS || desired_access == READ_CONTROL_ACCESS)
*pstat_open_only = True;
if(desired_access & (DELETE_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|
FILE_EXECUTE|FILE_READ_ATTRIBUTES|
FILE_READ_EA|FILE_WRITE_EA|SYSTEM_SECURITY_ACCESS|
- FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS))
+ FILE_WRITE_ATTRIBUTES|READ_CONTROL_ACCESS)) {
+ smb_open_mode = DOS_OPEN_RDONLY;
+ } else if(desired_access == 0) {
+
+ /*
+ * JRA - NT seems to sometimes send desired_access as zero. play it safe
+ * and map to a stat open.
+ */
+
+ *pstat_open_only = True;
smb_open_mode = DOS_OPEN_RDONLY;
- else {
+
+ } else {
DEBUG(0,("map_share_mode: Incorrect value %lx for desired_access to file %s\n",
(unsigned long)desired_access, fname));
return -1;
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
More information about the samba-technical
mailing list