1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-11 00:23:51 +03:00
Commit Graph

89 Commits

Author SHA1 Message Date
Andrew Tridgell
2ebcfcc6da r15797: fixed a notify bug, where a notify_remove() is beyond the current max
depth
2007-10-10 14:08:21 -05:00
Stefan Metzmacher
287fc1c22d r15734: This is a major change to the NTVFS subsystem:
- to use a struct ntvfs_handle instead of a uint16_t fnum.
  (to make it independend from the frontend protocol)
- the allocation of handles now is provided by the frontend
  (smbsrv_*) via callbacks and not by each backend module
- this also makes sure that file handles are only passed
  to the ntvfs subsystem when the tcon and session matches,
  so modules can rely on this and need to check this.
- this allows multiple modules in the ntvfs module chain
  to allocate file handles. This can be used for virtual
  files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"...
- also this will make SMB2 with 128 bit file handles possible

metze
2007-10-10 14:08:10 -05:00
Stefan Metzmacher
5d825261c0 r15614: the byte range locking error handling caches the last failed lock
per file handle and not per tree connect

metze
2007-10-10 14:07:00 -05:00
Stefan Metzmacher
5e256f4b78 r15613: the snum doesn't identify the tcon, but the brl_context pointer does
metze
2007-10-10 14:07:00 -05:00
Stefan Metzmacher
7fa6d73691 r15612: look at the lock_type and not at the notify_ptr being NULL or not
metze
2007-10-10 14:06:59 -05:00
Jelmer Vernooij
c19c2b51d3 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
2007-10-10 14:05:17 -05:00
Jelmer Vernooij
adc8a019b6 r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
2007-10-10 14:04:18 -05:00
Andrew Tridgell
ba0b8a218d r15048: started on the server side implementation of oplocks. The code is not
functional yet, I'm committing so it doesn't diverge too much from
other peoples work. It is disabled by default.
2007-10-10 14:04:03 -05:00
Jelmer Vernooij
d55b040bd2 r14993: Make subsystems again 2007-10-10 14:00:52 -05:00
Stefan Metzmacher
193f7da254 r14966: make more functions _PUBLIC_
metze
2007-10-10 14:00:47 -05:00
Stefan Metzmacher
a3e1d56cf7 r14964: - move sidmap code from ntvfs_common to SAMDB
- make ntvfs_common a library
- create sys_notify library

metze
2007-10-10 14:00:47 -05:00
Andrew Tridgell
4537de9289 r14960: don't declare variables mid-function 2007-10-10 14:00:46 -05:00
Andrew Tridgell
2a8f093105 r14959: allow change notify to be disabled completely using
notify:enable=False
2007-10-10 14:00:46 -05:00
Andrew Tridgell
16fd00925f r14956: change the notify search to be much more efficient by using a
per-depth bisection search. This makes the notify_trigger() call
log(N) which makes us scale well for large numbers of outstanding
notifies
2007-10-10 14:00:45 -05:00
Stefan Metzmacher
4d7de8b251 r14951: - remove unused var 'path'
- fix compiler warning

metze
2007-10-10 14:00:22 -05:00
Andrew Tridgell
467027e773 r14945: allow the notify backend to be specified per share 2007-10-10 14:00:21 -05:00
Stefan Metzmacher
03906b2b13 r14939: don't use a void pointer
metze
2007-10-10 14:00:20 -05:00
Andrew Tridgell
7c3d989fa4 r14920: allow a notify backend to separately specify if it has handled the
given mask for the current directory and sub-directories. This allows
us to setup the less efficient internal handling for subdirectories,
while using the kernel inotify service for the current directory if
available. It also allows inotify to handle only some of the filter
bits, leaving the other filter bits for the user space handler.
2007-10-10 14:00:17 -05:00
Andrew Tridgell
cf17ff15b1 r14918: cleaner handling of systems without inotify 2007-10-10 14:00:16 -05:00
Andrew Tridgell
eadadbb44a r14877: added support for the kernel inotify mechanism. This passes basic
tests, but still needs some more work to ensure we correctly cope with
events that may generate both a system inotify event and a internal
notify event. The system inotify events won't handle recursion, and
don't understand things like streams.

This also adds the ntvfs/sysdep/ directory, which is meant for system
dependent code that is not tied to a particular ntvfs backend. The
inotify code is a good example of that.
2007-10-10 14:00:11 -05:00
Stefan Metzmacher
9ec706238c r14860: create libcli/security/security.h
metze
2007-10-10 13:59:44 -05:00
Andrew Tridgell
63ae3f21e3 r14838: fix the build. Looks like I still haven't quite got the hang of the
new dependency/proto system :-)
2007-10-10 13:59:25 -05:00
Andrew Tridgell
33495d19cf r14835: split out the config rules for the ntvfs/common/ directory 2007-10-10 13:59:24 -05:00
Stefan Metzmacher
d41d48caf2 r14822: if we use the snum used by the lp_* functions instead of the wire TID,
then don't use tid as name...

metze
2007-10-10 13:59:24 -05:00
Andrew Tridgell
a6be44f78c r14805: use tdb_lock_bystring() to prevent race conditions in notify add/remove 2007-10-10 13:59:21 -05:00
Andrew Tridgell
16742cd286 r14803: copy with the root directory, which has /. on the end of the path 2007-10-10 13:59:21 -05:00
Andrew Tridgell
d09b8761bf r14800: use tdb_get_seqnum() in the change notify code to avoid reloading the
notify record if the tdb has not changed. This makes the
notify_trigger() call much faster, which is important as it is called
on just about every file operation
2007-10-10 13:59:20 -05:00
Andrew Tridgell
1db0a5a7f4 r14797: added checking of the filter in notify requests 2007-10-10 13:59:20 -05:00
Andrew Tridgell
4d234b37e5 r14755: the change notify code now passes most of the RAW-NOTIFY test. Still
more work to do though
2007-10-10 13:59:18 -05:00
Stefan Metzmacher
bac95bb8f4 r14736: - the ntvfs subsystem should not know about smb_server.h
- the process module subsystem should not know about smb_server.h
- the smb_server module should not know about process models

metze
2007-10-10 13:59:17 -05:00
Andrew Tridgell
1624ea88e6 r14616: added notify change support to the posix backend
It doesn't fully work yet, and doesn't yet have all the efficiency
that is planned, but it doesn't break anything and I wanted to get the
code in the tree to minimise the chance of collisions with the work
metze is doing.
2007-10-10 13:59:02 -05:00
Jelmer Vernooij
3dd477ca51 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
2007-10-10 13:57:27 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Andrew Tridgell
cd2602d057 r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETE
test to pass. To try to make the code a bit more understandable, I
moved to using an IDL description of the opendb tdb record format.

One of the larger changes was to make directory opens and creates go
via the opendb code, so directory operations now obey all the share
mode restrictions, as well as delete on close semantics. I also
changed the period over which the opendb locks are held, to try to
minimise races due to two open operations happening at the same time.
2007-10-10 13:52:08 -05:00
Stefan Metzmacher
830c42afda r13708: fix compiler warnings
metze
2007-10-10 13:52:06 -05:00
Andrew Tridgell
f7d0ac9363 r13701: removed some unnecessary casts 2007-10-10 13:52:06 -05:00
Jelmer Vernooij
ba62880f5b r13658: More moving around of files:
- Collect the generic utility functions into a lib/util/ (a la GLib is
		for the GNOME folks)
 - Remove even more files from include/
2007-10-10 13:52:05 -05:00
Andrew Bartlett
c05f6be09a r13281: Use TALLOC_CTX * not a void *, and use tmp_ctx as the name for consistancy.
(I was chasing ghosts in this code, and decided to do a cleanup while
I was there).

Andrew Bartlett
2007-10-10 13:51:42 -05:00
Andrew Tridgell
c5b709fae6 r13276: start to work towards the BASE-DELETE test passing. This change
ensures that we give the right error code to opens that are denied due
to the file having delete pending set
2007-10-10 13:51:41 -05:00
Jelmer Vernooij
c722f665c9 r12694: Move some headers to the directory of the subsystem they belong to. 2007-10-10 13:49:39 -05:00
Jelmer Vernooij
70e7449318 r12608: Remove some unused #include lines. 2007-10-10 13:49:03 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00
Andrew Bartlett
fd7203789a r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
2007-10-10 13:39:32 -05:00
Andrew Bartlett
4969f86ac2 r10148: Use samdb_base_dn() to find the local domain.
Andrew Bartlett
2007-10-10 13:38:03 -05:00
Andrew Tridgell
d40bc2fa8d r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
2007-10-10 13:18:44 -05:00
Volker Lendecke
da78ed1a4d r7621: Trivial reformatting while trying to understand share modes. Still survives
smbtorture *DENY* .

Volker
2007-10-10 13:18:14 -05:00
Andrew Tridgell
3d589a0995 r7294: implemented the irpc messaging system. This is the core of the
management system I proposed on samba-technical a couple of days
ago. Essentially it is a very lightweight way for any code in Samba to
make IDL based rpc calls to anywhere else in the code, without the
client or server having to go to the trouble of setting up a full rpc
service.

It can be used with any of our existing IDL, but I expect it will
mostly be used for a new set of Samba specific management calls.

The LOCAL-IRPC torture test demonstrates how it can be used by calling
the echo_AddOne() call over this transport.
2007-10-10 13:17:37 -05:00
Andrew Bartlett
e13c671619 r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
2007-10-10 13:11:12 -05:00
Andrew Tridgell
196c45b834 r5309: removed ads.h from includes.h 2007-10-10 13:09:40 -05:00
Andrew Tridgell
826baec7b3 r5307: removed db_wrap.h from includes.h 2007-10-10 13:09:40 -05:00