| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This patch is the first iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
merge from http://samba.org/~tridge/3_0-ctdb
Jeremy.
|
|
|
|
|
|
| |
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
|
|
|
|
|
| |
negotiation works.
Jeremy.
|
|
|
|
|
|
|
|
|
| |
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
|
|
|
|
|
|
|
| |
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the two functions talloc_stackframe() and talloc_tos().
* When a new talloc stackframe is allocated with talloc_stackframe(), then
* the TALLOC_CTX returned with talloc_tos() is reset to that new
* frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
* happens: The previous talloc_tos() is restored.
*
* This API is designed to be robust in the sense that if someone forgets to
* TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
* resets the talloc_tos().
The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.
The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.
This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)
So, never do a
tmp_ctx = talloc_init("foo");
anymore, instead, use
tmp_ctx = talloc_stackframe()
:-)
Volker
|
|
|
|
|
| |
With the inbuf consistency checks we have to more correctly fake the
inbuf
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
Should fix the build.
Jeremy.
|
|
|
|
|
| |
max_param or return NT_STATUS_OK.
Jeremy.
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
|
|
| |
This should coalesce identical adjacent notify records - making the "too large"
bug very rare indeed. Please test.
Jeremy.
|
|
|
|
|
| |
to client max buf size.
Jeremy.
|
|
|
|
|
|
|
|
| |
Jeremy, I am always very confused about the different length arguments
in convert_string and friends. Can you take a look at the change in
string_replace and verify it's ok? Thanks!
While at it, remove the pstring limit for strhasupper and strhaslower.
|
|
|
|
| |
failed expression in SMB_ASSERT.
|
|
|
|
|
|
| |
request. Ignore it. Should fix bug #4689 but more tests and
valgrinding will follow.
Jeremy.
|
|
|
|
|
|
| |
pstring. Give it one, although I hate putting it in :-)
Thanks to Tom Bork! :-)
|
|
|
|
|
|
|
| |
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
|
|
|
|
| |
Volker
|
| |
|
|
|
|
|
|
|
|
| |
checkin, I'm
working on that right now.
Volker
|
|
|
|
|
|
| |
Now to clean up / fix lots of stuff.
Volker
|
| |
|
| |
|
| |
|
|
|
|
| |
Volker
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from Samba4,
not compiled yet. This way the modifications become visible later.
ntvfs/common/notify.c -> smbd/notify_internal.c
ntvfs/sysdep/inotify.c -> smbd/notify_inotify.c
Naturally I had to disable notify again :-)
Volker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void message_register(int msg_type,
void (*fn)(int msg_type, struct process_id pid,
- void *buf, size_t len))
+ void *buf, size_t len,
+ void *private_data),
+ void *private_data)
{
struct dispatch_fns *dfn;
So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.
Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.
Volker
|
| |
|
|
|
|
|
|
|
|
|
| |
from being
complete, in particular the various mask bits are not correctly supported
yet. Checkin in now, I want to see how the build farm likes it.
Volker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
event-driven
based approach. The only remaining hook into the backend is now
void *(*notify_add)(TALLOC_CTX *mem_ctx,
struct event_context *event_ctx,
files_struct *fsp, uint32 *filter);
(Should we put this through the VFS, so that others can more easily plug in?)
The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.
The backend can notify the main smbd process via
void notify_fsp(files_struct *fsp, uint32 action, char *name);
The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.
Based on this I'll continue with inotify now.
Volker
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
make sense
again :-)
Volker
|
|
|
|
|
|
|
|
|
| |
starts to make
sense. Until then, remove it from the tree to keep the diff between 3_0_24 and
3_0 small.
Volker
|
|
|
|
| |
Volker
|
| |
|
|
|
|
|
|
| |
Add lots of TODOs :-)
Volker
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
survives the
first of the raw-notify subtests, the one-level test_notify_dir without any
flags around yet.
The tricky part was getting the data structures right, I hope the next tests
don't let that fall over.
fsp->notify is now by default NULL, meaning that nobody has issued a
changenotify call. This means nobody is interested in changes for this
directory.
If that has happened, notify_change_buf collects the changes if no current
request is outstanding, and it collects the requests if no change has happened
since the last request.
Happy New Year, somewhere on this planet it's already 2007 :-)
Volker
P.S: Jeremy, there's a question for you in smbd/files.c line 367.
|