Age | Commit message (Collapse) | Author | Files | Lines |
|
Since commit 7022554, smbds share a printcap cache (printer_list.tdb),
therefore ordering of events between smbd processes is important when
updating printcap cache information. Consider the following two process
example:
1) smbd1 receives HUP or printcap cache time expiry
2) smbd1 checks whether pcap needs refresh, it does
3) smbd1 marks pcap as refreshed
4) smbd1 forks child1 to obtain cups printer info
5) smbd2 receives HUP or printcap cache time expiry
6) smbd2 checks whether pcap needs refresh, it does not (due to step 3)
7) smbd2 reloads printer shares prior to child1 completion (stale pcap)
8) child1 completion, pcap cache (printer_list.tdb) is updated by smbd1
9) smbd1 reloads printer shares based on new pcap information
In this case both smbd1 and smbd2 are reliant on the pcap update
performed on child1 completion.
The prior commit "reload shares after pcap cache fill" ensures that
smbd1 only reloads printer shares following pcap update, however smbd2
continues to present shares based on stale pcap data.
This commit addresses the above problem by driving pcap cache and
printer share updates from the parent smbd process.
1) smbd0 (parent) receives a HUP or printcap cache time expiry
2) smbd0 forks child0 to obtain cups printer info
3) child0 completion, pcap cache (printer_list.tdb) is updated by smbd0
4) smbd0 reloads printer shares
5) smbd0 notifies child smbds of pcap update via message_send_all()
6) child smbds read fresh pcap data and reload printer shares
This architecture has the additional advantage that only a single
process (the parent smbd) requests printer information from the printcap
backend.
Use time_mono in housekeeping functions As suggested by Björn Jacke.
|
|
Since commit eada8f8a, updates to the cups pcap cache are performed
asynchronously - cups_cache_reload() forks a child process to request
cups printer information and notify the parent smbd on completion.
Currently printer shares are reloaded immediately following the call to
cups_cache_reload(), this occurs prior to smbd receiving new cups pcap
information from the child process. Such behaviour can result in stale
print shares as outlined in bug 7836.
This fix ensures print shares are only reloaded after new pcap data has
been received.
Pair-Programmed-With: Lars Müller <lars@samba.org>
|
|
Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Tue Jan 4 18:56:38 CET 2011 on sn-devel-104
|
|
|
|
|
|
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 29 02:15:23 CET 2010 on sn-devel-104
|
|
pass this in as the &now parameter. Push this call inside of
event_add_to_select_args() to the correct point so it doesn't
get called unless needed.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 23 01:08:11 CET 2010 on sn-devel-104
|
|
is incorrect.
(I based it on the text in MS-SMB2, silly me :-). Fix it so incoming sequence numbers
can range over the entire allowable bitmap range. This fixes a repeatable
disconnect against Win7.
Jeremy.
|
|
strict allocation on sparse files. Files opened as POSIX opens are always
sparse.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 21 04:12:22 CET 2010 on sn-devel-104
|
|
allocation extent without changing end-of-file size.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 21 02:41:24 CET 2010 on sn-devel-104
|
|
set_operation_credits()
twice (ultimately perhaps because of bug 7331 involving this compound sequence and the need
to be ready for any incoming CANCEL of the NOTIFY). This had the server thinking it had
granted more credit than it actually had, which lead to zero-credits being granted in interim
NOTIFY responses.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec 20 20:59:55 CET 2010 on sn-devel-104
|
|
get but not on set.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec 20 20:11:22 CET 2010 on sn-devel-104
|
|
|
|
|
|
|
|
|
|
vfs_fallocate_mode parameter.
It turns out we need the fallocate operations to be able to both
allocate and extend filesize, and to allocate and not extend
filesize, and posix_fallocate can only do the former. So by defining
the vfs op as posix_fallocate we lose the opportunity to use any
underlying syscalls (like Linux fallocate) that can do the latter
as well.
We don't currently use the non-extending filesize call, but now
I've changed the vfs op definition we can in the future. For the
moment simply map the fallocate op onto posix_fallocate for the
VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the
VFS_FALLOCATE_KEEP_SIZE case.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
|
|
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 17 21:56:38 CET 2010 on sn-devel-104
|
|
|
|
this is a port of a patch from metze for 3.3:
We don't do the "strict allocation" when the sparse bit isn't
set, but that shouldn't matter.
We now allow windows applications to set and unset the sparse
bit.
Note that in order to implement this 100% like described
in [MS-FSA], we'd have to change our data model and support
the sparse flag per stream.
|
|
this is based on a patch for 3.3 from metze
|
|
we need to determine sparseness from the sparse flag we store not from the
allocation size on the POSIX filesystem. This is how Windows works - in the
first place sparseness is a file flag, not the allocation state of the file
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
We need to return the file size here, not the allocation size, but
we were not updating the stat struct after the vfs_set_filesize()
call. Ensure we always use fresh data in openX replies.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 16 02:37:58 CET 2010 on sn-devel-104
|
|
95cb7adcd03a1abbd0af395b6c96dd8e0eebd3d1)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 15 02:24:08 CET 2010 on sn-devel-104
|
|
Change smb2_read code to allocate return DATA_BLOB just before the read.
Preparing for SMB2 sendfile change which will not need to allocate
return buffer.
Jeremy
|
|
fsp->fsp_name->st
instead of a SMB_STRUCT_STAT on the stack.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 14 05:05:50 CET 2010 on sn-devel-104
|
|
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 14 01:09:05 CET 2010 on sn-devel-104
|
|
WITH_SENDFILE ifdefs.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec 13 23:47:07 CET 2010 on sn-devel-104
|
|
when processing the faked up SMB2 NegProt from the SMB1 packet we
always allocate one credit on reply.
Jeremy.
|
|
|
|
128 credits.
Jeremy.
|
|
This patch, based on the suggestion by Goldberg, Neil R. <ngoldber@mitre.org>
turns off the sending of the principal in the negprot by default, matching
Windows 2008 behaviour.
This slowly works us back from this hack, which from an RFC
perspective was never the right thing to do in the first place, but we
traditionally follow windows behaviour. It also discourages client
implmentations from relying on it, as if they do they are more open to
man-in-the-middle attacks.
Andrew Bartlett
|
|
vfs_slow_fallocate()
and use that from both the truncate and fill_sparse functions.
Jeremy.
|
|
Jeremy.
|
|
allocate is on
Tries posix_fallocate() and then falls back to old code.
Jeremy.
|
|
Jeremy.
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Dec 2 01:18:19 CET 2010 on sn-devel-104
|
|
message_push_string() and message_push_blob() both update
the bcc value, so we don't need the old code that tries to
do it manually.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Nov 29 22:24:01 CET 2010 on sn-devel-104
|
|
but makes logic cleaner. Pointed out by Metze.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 24 01:47:13 CET 2010 on sn-devel-104
|
|
module, change the signature of VFS_REALPATH to always return a
malloc'ed string.
Needed to make some privileges work I plan on doing shortly
easier to code.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Nov 20 02:15:50 CET 2010 on sn-devel-104
|
|
the daemons themselves. Allows client utilities to silently
fail to create a messaging context due to access denied on the
messaging tdb (which I need for the following patch).
Jeremy.
|
|
This avoids some special casing in the waf code.
|
|
adding new share via MMC
Change the find_service() interface to not depend on fstring, and
create a useable talloc-based interface.
Jeremy.
|
|
called-parameter-is-modified.
Jeremy.
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov 5 11:24:41 UTC 2010 on sn-devel-104
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Nov 4 17:44:09 UTC 2010 on sn-devel-104
|
|
If you look at traces of "smbcacls" reading a secdesc from Samba and from W2k3
shows this difference in the querysecdesc nttrans reply. This patch is
necessary to enable viewing previous versions via the shadow copy modules from
Windows 2008. The other client versions seem not to care, but W2k8 does.
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov 3 17:04:28 UTC 2010 on sn-devel-104
|
|
The problem here is that we cannot run lp_set_cmdline() (directly or
indirectly via the popt helpers) until load_case_tables() has been run.
However, load_case_tables does not have auto-initialisation, so we
must init it once, and once only.
Andrew Bartlett
|
|
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.
Andrew Bartlett
|