On Tue, Aug 01, 2006 at 08:28:57PM -0300, Andreas Hasenack wrote: > On Tuesday 01 August 2006 17:47, Jeremy Allison wrote: > > On Tue, Aug 01, 2006 at 08:18:42PM +0000, Damian Sinclair wrote: > > > I guess there's a bit of concern that this problem will cause a fair > > > number of systems to stop working in a way that isn't entirely easy to > > > diagnose or resolve, so causing a lot of frustration. I have no idea how > > > the community handles issues like these, but have the samba team notified > > > the relevant repository and distro managers about the bug? > > > > I'm sorry about the problem but fixed it as soon as I knew about it, > > and we'll be releasing a 3.0.23b asap to fix this issue. Package > > maintainers for Samba on distros should be on samba-technical, so > > we haven't done any asynchronous notification - we only do that > > for security bugs via vendor-sec. > > Why not publish a patch for 3.0.23a? Many people find it easier to apply a > patch than to browse svn and fetch patches from it (once they know which > revision as the correct fix).
Here's the patch for 3.0.23a. Jeremy.
Index: smbd/open.c =================================================================== --- smbd/open.c (revision 17258) +++ smbd/open.c (revision 17259) @@ -1204,14 +1204,12 @@ /* If file exists replace/overwrite. If file doesn't * exist create. */ flags2 |= (O_CREAT | O_TRUNC); - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_OVERWRITE_IF: /* If file exists replace/overwrite. If file doesn't * exist create. */ flags2 |= (O_CREAT | O_TRUNC); - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_OPEN: @@ -1238,7 +1236,6 @@ return NULL; } flags2 |= O_TRUNC; - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ break; case FILE_CREATE: @@ -1292,9 +1289,6 @@ /* This is a nasty hack - must fix... JRA. */ if (access_mask == MAXIMUM_ALLOWED_ACCESS) { open_access_mask = access_mask = FILE_GENERIC_ALL; - if (flags2 & O_TRUNC) { - open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ - } } /* @@ -1302,7 +1296,12 @@ */ se_map_generic(&access_mask, &file_generic_mapping); + open_access_mask = access_mask; + if (flags2 & O_TRUNC) { + open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */ + } + DEBUG(10, ("open_file_ntcreate: fname=%s, after mapping " "access_mask=0x%x\n", fname, access_mask )); @@ -1539,9 +1538,11 @@ unx_mode = 0777; } - DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o\n", + DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o, " + "access_mask = 0x%x, open_access_mask = 0x%x\n", (unsigned int)flags, (unsigned int)flags2, - (unsigned int)unx_mode)); + (unsigned int)unx_mode, (unsigned int)access_mask, + (unsigned int)open_access_mask)); /* * open_file strips any O_TRUNC flags itself.
-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba