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

3141 Commits

Author SHA1 Message Date
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
fd0f2e20ee r21121: Fix error message, based on RAW-NOTIFY
(This used to be commit 2d0a0a0b34)
2007-10-10 12:17:40 -05:00
Volker Lendecke
f4c3d1543d r21120: Make notify a bit more robust: Delete the notify records if we figured out
that the process holding it is not around anymore.

Tridge, please review this and possibly also include it in 4. We can discuss
the error message for "unknown target" from messaging_send, INVALID_HANDLE
seemed to be most appropriate to me.

Volker
(This used to be commit 3b3ed7429e)
2007-10-10 12:17:40 -05:00
Volker Lendecke
69d8c5ae5f r21115: notify_internal.c needs to remove the table entry if a process has crashed. So
it needs the specific error message.

Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if
sending to a non-existent process.

Volker
(This used to be commit 3f620d181d)
2007-10-10 12:17:39 -05:00
Volker Lendecke
bad8c39f1c r21111: Reorganize the change notify params a bit. We now have the per-share
parameters

change notify = [yes]/no           # do we do it at all
kernel change notify = [yes]/no    # enable/disable inotify

Those who want FAM need to say

change notify = yes
vfs objects = notify_fam

Volker
(This used to be commit c3a44d8b96)
2007-10-10 12:17:39 -05:00
Volker Lendecke
6b8fc040e5 r21109: Send notify_fam.c through the VFS. Lets see how the build farm likes this.
Volker
(This used to be commit e57a6d4d63)
2007-10-10 12:17:38 -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
8b7233f19b r21107: Adapt notify_fam.c to the new infrastructure. This works in my test, but does
not survive the raw-notify test just because famd is too slow. Events are
coming in too late and are thus unsyncronized.

Now to get that through the VFS.

Volker
(This used to be commit c84bf6c4f9)
2007-10-10 12:17:38 -05:00
Volker Lendecke
6b5c848e91 r21104: Rename struct watch_context to struct inotify_watch_context
(This used to be commit 7ac79203f2)
2007-10-10 12:17:37 -05:00
Jeremy Allison
4e1a6ca710 r21097: Ensure that when manipulating UNIX permissions via
the UNIX extensions we use the correct mask/force mask
settings for new and existing files/directories. Bug
reported by Juran David <ext-david.juran@nokia.com>.
Jeremy.
(This used to be commit d84af53666)
2007-10-10 12:17:36 -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
697ccab3f0 r21089: Do notifies on rename
(This used to be commit 2aadb95a7e)
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
b9af964680 r21083: Actually make it static... :-)
(This used to be commit 65f473d22b)
2007-10-10 12:17:34 -05:00
Volker Lendecke
37a3339a18 r21082: Make canonicalize_path static to service.c -- we do have conn->connectpath
(This used to be commit 06f58096e3)
2007-10-10 12:17:34 -05:00
Volker Lendecke
434bf5fadd r21080: Reformatting
(This used to be commit 705f866a78)
2007-10-10 12:17:34 -05:00
Volker Lendecke
b0bf3ddb38 r21079: Minimizing diff: Adopt the Samba4 style ChangeNotify flags.
Volker
(This used to be commit a3c1069b0c)
2007-10-10 12:17:33 -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
05f298b47e r21073: Fix compiler warning
(This used to be commit 3977ee027f)
2007-10-10 12:17:33 -05:00
Jeremy Allison
44da8a6907 r21067: Finished refactoring setqpathinfo to be readable
and modifiable by other people. Now to look over
the build farm and fix any breakage.
Jeremy.
(This used to be commit 997259f247)
2007-10-10 12:17:32 -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
Jeremy Allison
cb916d33f5 r21063: All case statements are now NTSTATUS returning
functions. Now to factor out the post processing
and make all cases behave the same (no mixture
of "early returns" and "break"s.
Jeremy
(This used to be commit 7e17e54cb7)
2007-10-10 12:17:32 -05:00
Jeremy Allison
deaf4131b9 r21062: Should fix the build plus make all refactored
functions return NTSTATUS.
Jeremy.
(This used to be commit 1f3c2b2abc)
2007-10-10 12:17:31 -05:00
Jeremy Allison
e5be27a308 r21061: Refactoring all the cases into NTSTATUS returns.
Jeremy.
(This used to be commit da4ce69d40)
2007-10-10 12:17:31 -05:00
Jeremy Allison
5c9344fa4c r21060: Start refactoring out the non-return case statements
into functions.
Jeremy.
(This used to be commit 461db3c8ed)
2007-10-10 12:17:31 -05:00
Jeremy Allison
a4e3c20deb r21058: Finish the easy refactoring - split out all the case
statements that do early return. Next will be case
statements that need post processing, finally on to
qfilepathinfo and do the same.
Jeremy.
(This used to be commit c961d5ce94)
2007-10-10 12:17:31 -05:00
Jeremy Allison
845647f468 r21057: More refactoring into functions.
Jeremy.
(This used to be commit fe2d7cb2dc)
2007-10-10 12:17:31 -05:00
Jeremy Allison
e90b6c743d r21054: More function refactoring.
Jeremy.
(This used to be commit b6f43e9509)
2007-10-10 12:17:30 -05:00
Jeremy Allison
54aefc2267 r21053: More refactoring and fix the tests (set position info
on a pathname is ignored).
Jeremy.
(This used to be commit 3c7a876c90)
2007-10-10 12:17:30 -05:00
Jeremy Allison
1e55fdb7b7 r21052: Refactoring.
Jeremy.
(This used to be commit 9e31d7dba3)
2007-10-10 12:17:30 -05:00
Jeremy Allison
c219ebd7e8 r21051: More function refactoring... Added #if 0 for
questionable practice (ignoring bad fsp on
handle based call).
Jeremy.
(This used to be commit 5a8c9286c3)
2007-10-10 12:17:30 -05:00
Jeremy Allison
7c5221a777 r21050: Factor out SMB_SET_FILE_DISPOSITION_INFO. My
intent is to factor out all cases where we
always return from the case.
Jeremy.
(This used to be commit 3eca52ba43)
2007-10-10 12:17:29 -05:00
Jeremy Allison
1e753db3d4 r21049: Start to refactor some of the setpath set code
into separate functions (tridge mailed me a fresh
batch) to make it easier to add the POSIX open we'll
need soon.
Jeremy.
(This used to be commit 63bd8759fe)
2007-10-10 12:17:29 -05:00
Jeremy Allison
3bd12f9658 r21035: Remove unneeded checks on incoming uid/gid for
mknod (fifo) unix extensions code. Problem
discovered by Anders Karlsson <anders.karlsson@redhat.com>.
Jeremy.
(This used to be commit ec6033ad7c)
2007-10-10 12:17:28 -05:00
Herb Lewis
109bebe1f8 r21002: Get rid of unused macros - merge change from 3_0_24
(This used to be commit 9d23cf0cc4)
2007-10-10 12:17:25 -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
James Peach
23e227ac39 r20966: Only attempt to reload the config file atfer the fork point if we
are in daemon mode. If we are in inetd mode, there's really no point
in rechecking it so soon.
(This used to be commit 029d4bb5e3)
2007-10-10 12:17:22 -05:00
Volker Lendecke
0de21e9515 r20933: Fix the build without inotify
(This used to be commit 4587d80972)
2007-10-10 12:17:21 -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
Jeremy Allison
aacd16e7c4 r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
(This used to be commit 7f817067a7)
2007-10-10 12:17:19 -05:00
Jeremy Allison
c9a14ea19f r20883: W00t! I now understand how "delete on close" really
works - even with the strange "initial delete on close"
semantics. The "initial delete on close" flag isn't
committed to the share mode db until the handle is
closed, and is discarded if any real "delete on close"
was set. This allows me to remove the "initial_delete_on_close"
flag from the share db, and move it into a BOOL in files_struct.
Warning ! You must do a make clean after this. Cope with
the wrinkle in directory delete on close which is done
differently from files. We now pass all Samba4 smbtortute
BASE-DELETE tests except for the one checking that files
can't be created in a directory which has the delete on
close set (possibly expensive to fix).
Jeremy.
(This used to be commit f2df77a149)
2007-10-10 12:17:18 -05:00
Volker Lendecke
00deaa584c r20878: Fix build with --enable-profiling
(This used to be commit eb14d0ea83)
2007-10-10 12:17:17 -05:00
Volker Lendecke
2958f46733 r20877: Random notify fixes
(This used to be commit 2f1bfc5373)
2007-10-10 12:17:17 -05:00
Jeremy Allison
fd37f98158 r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.
Allow us to correctly refuse to set delete on close on a
non-empty directory. There are still some delete-on-close
wrinkles to be fixed, but I understand how to do that better
now. I'll fix this tomorrow.
Jeremy.
(This used to be commit 0296358858)
2007-10-10 12:17:16 -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