1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

56 Commits

Author SHA1 Message Date
Volker Lendecke
32ba5145b8 r23518: Remove the silly assumption that string_replace requires a pstring.
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.
(This used to be commit e6e5703658)
2007-10-10 12:23:25 -05:00
James Peach
b1ce226af8 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2)
2007-10-10 12:23:23 -05:00
Jeremy Allison
28bc066aa8 r23450: max_params_return is complete fiction when getting a changenotify
request. Ignore it. Should fix bug #4689 but more tests and
valgrinding will follow.
Jeremy.
(This used to be commit c23e08cc09)
2007-10-10 12:23:17 -05:00
Volker Lendecke
87d18ac488 r22755: Second half of r22754. As it stands now, string_replace expects a
pstring. Give it one, although I hate putting it in :-)

Thanks to Tom Bork! :-)
(This used to be commit f4ea3fd365)
2007-10-10 12:21:54 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Volker Lendecke
0d0e322d4d r21123: Make notify_fsp() static to notify.c.
Volker
(This used to be commit d663b729c0)
2007-10-10 12:17:41 -05:00
Volker Lendecke
240a3fd644 r21108: Send sys_notify_watch through the VFS, FAM is next
(This used to be commit 603a967613)
2007-10-10 12:17:38 -05:00
Volker Lendecke
9974656d3b r21093: Remove the hash and dnotify backends. Disabling FAM for this checkin, I'm
working on that right now.

Volker
(This used to be commit 01c9fb1728)
2007-10-10 12:17:36 -05:00
Volker Lendecke
2852ecc67e r21092: Ok, that's the one that activates the Samba4 notify backend.
Now to clean up / fix lots of stuff.

Volker
(This used to be commit 9e7443fa14)
2007-10-10 12:17:36 -05:00
Volker Lendecke
accbfaa4c3 r21091: Fix the build without inotify
(This used to be commit 686345b7ed)
2007-10-10 12:17:36 -05:00
Volker Lendecke
3af5838096 r21090: Add some helper routines
(This used to be commit 985dde8ed0)
2007-10-10 12:17:35 -05:00
Volker Lendecke
547f77778a r21087: Make the param list of notify_fname match notify_trigger
(This used to be commit defa28f9c3)
2007-10-10 12:17:34 -05:00
Volker Lendecke
113e21f0a5 r21084: Make the Samba4 files compile in Samba3, not activated yet.
Volker
(This used to be commit c24854433a)
2007-10-10 12:17:34 -05:00
Volker Lendecke
9ee97d2f7d r21077: A step to minimize the diff later: This pulls in unmodified files 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
(This used to be commit cdb7d582b7)
2007-10-10 12:17:33 -05:00
Volker Lendecke
caf8c6a76b r21064: The core of this patch is
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
(This used to be commit c8ae60ed65)
2007-10-10 12:17:32 -05:00
Volker Lendecke
db8ee51cf2 r20982: Fix a segfault -- I wonder why my make test did not show this earlier...
(This used to be commit 4984b0627c)
2007-10-10 12:17:22 -05:00
Volker Lendecke
420e577004 r20932: This is the basic infrastructure for inotify support. This is far 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
(This used to be commit c9a5d011a9)
2007-10-10 12:17:21 -05:00
Volker Lendecke
d5206610cd r20931: This changes the notify infrastructure from a polling-based to an 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
(This used to be commit 9cd6a8a827)
2007-10-10 12:17:21 -05:00
Volker Lendecke
ab41ff67f1 r20858: change_notify_reply_packet is static
(This used to be commit a1d0644d15)
2007-10-10 12:17:14 -05:00
Volker Lendecke
90f59d4412 r20856: Make "struct notify_mid_map" private to notify.c
(This used to be commit beecef0c70)
2007-10-10 12:17:14 -05:00
Volker Lendecke
940192ddcc r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)

Volker
(This used to be commit 5533cdeec1)
2007-10-10 12:17:13 -05:00
Volker Lendecke
46fdae1b6b r20634: A *LOT* more work is necessary before touching notify remotely starts to make
sense. Until then, remove it from the tree to keep the diff between 3_0_24 and
3_0 small.

Volker
(This used to be commit f146a85e74)
2007-10-10 12:17:00 -05:00
Volker Lendecke
c79be5713a r20602: Fix coverity ID 339. SMB_ASSERT does not panic without -DDEVELOPER.
Volker
(This used to be commit 33b5950bec)
2007-10-10 12:16:57 -05:00
Volker Lendecke
b2efff8fe5 r20597: Survive some of the notify mask tests.
(This used to be commit e4a2e63272)
2007-10-10 12:16:57 -05:00
Volker Lendecke
92d02f7afe r20451: Survive the first of the filter-tests (mkdir).
Add lots of TODOs :-)

Volker
(This used to be commit 0e953884a1)
2007-10-10 12:16:50 -05:00
Volker Lendecke
dbc231a1c6 r20443: Fix a compiler warning
(This used to be commit 19781d71fc)
2007-10-10 12:16:50 -05:00
Volker Lendecke
200bd10b32 r20442: Slight rewrite of the change notify infrastructure. This now 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.
(This used to be commit ce0ad24988)
2007-10-10 12:16:50 -05:00
Volker Lendecke
165f5f3f40 r20433: Work in progress: Survive more of RAW-NOTIFY.
call_nt_transact_notify_change() is now sync if there are changes around.

A notify_message does a direct reply from within the message, so
process_pending_change_notify_queue is not needed anymore for samba-generated
events. Next step is to restructure the kernel-mechanisms to generate
messages.

Volker
(This used to be commit c813f71d00)
2007-10-10 12:16:49 -05:00
Volker Lendecke
98c082489b r20394: This is a *VERY* early start of my work on notify.
Checking in because Jeremy was bugging me. Potentially this becomes quite
intrusive, I'm not sure if I should open a temporary branch for this.

Jeremy, Jerry, do you think 3_0 is the right place for this?

Volker
(This used to be commit bcf5c751cb)
2007-10-10 12:16:46 -05:00
James Peach
5bb49b08f3 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
send_smb failures should be clean exits. All times when we exit as
a matter of policy should also be clean exits.
(This used to be commit d6382092e7)
2007-10-10 12:16:34 -05:00
Jeremy Allison
2602e5fab1 r15555: Make "change notify timeout" a per-share parameter - used
when there's no kernel or FAM change notify. If set to zero
this will turn off change notify for the share except when
we ourselves change something (renames / deletes etc. ).
Designed to help on large directory shares where a new
changenotify is issued between each delete. This will
be fixed correctly when we move to internal change notify
(eg. back-port Samba4 changenotify).
Jeremy.
(This used to be commit 5a17bffbcd)
2007-10-10 11:16:59 -05:00
James Peach
8fbdd112b2 r13482: Push the FAM notification file descriptor into the select
set to avoid unnecessary polling.
(This used to be commit 1dce945ccb)
2007-10-10 11:10:05 -05:00
James Peach
543ff192b3 r13027: Support file change notifications from FAM.
(This used to be commit 652b511ff2)
2007-10-10 11:06:11 -05:00
Jeremy Allison
c0dad16e0f r11344: I don't think share mode conflicts occur on deleting
a directory when you've got permissions. Need to write
a smbtorture test for this.
Jeremy.
(This used to be commit e959a5be39)
2007-10-10 11:05:13 -05:00
Jeremy Allison
f2f55d703d r7963: Add aio support to 3.0.
Jeremy.
(This used to be commit 1de27da470)
2007-10-10 10:58:05 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
3fe18a46a3 Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>
Jeremy.
(This used to be commit 63f3315643)
2003-10-21 17:40:58 +00:00
Jeremy Allison
110abf10d2 Turns out I had my packet sequences wrong for oplock break code.
I was storing the mid of the oplock break - I should have been
storing the mid from the open. There are thus 2 types of deferred
packet sequence returns - ones that increment the sequence number
(returns from oplock causing opens) and ones that don't (change notify
returns etc). Running with signing forced on does lead to some
interesting tests :-).
Jeremy.
(This used to be commit 85907f02ce)
2003-08-07 02:59:52 +00:00
Jeremy Allison
b925d197f5 Ensure we don't leak any sign records on cancel of pending requests.
Jeremy.
(This used to be commit 9a8ffc239c)
2003-08-02 08:48:01 +00:00
Jeremy Allison
0c9433c031 Ensure everywhere we defer an incoming SMB request (blocking lock queue,
in oplock break state, change notify queue) we also push the MID onto
the deferred signing queue. Tomorrow I will test this with valgrind and
oplock tests.
Jeremy.
(This used to be commit 33a377f372)
2003-07-24 06:56:56 +00:00
Jeremy Allison
08634e26e4 SMB signing is now working with change notify. Need to fix the disconnect
when bad signature received, plus check the oplock breaks....
Jermey.
(This used to be commit dd83931a00)
2003-07-24 06:19:37 +00:00
Jeremy Allison
d0fe43f918 Added "kernel change notify" boolean to allow easier valgrind testing.
Jeremy.
(This used to be commit faf89f214f)
2002-12-12 02:01:56 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220)
2001-11-05 00:02:38 +00:00
Jeremy Allison
4bb9cebf84 Tidy up debug in notify code.
Jeremy.
(This used to be commit 7707c5e073)
2001-10-19 08:37:32 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
major changes include:

- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
  these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code

We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls

but that is too much for one night
(This used to be commit 83d9896c1e)
2001-08-27 08:19:43 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c536)
2001-06-09 01:38:54 +00:00