summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r14616: added notify change support to the posix backendAndrew Tridgell1-0/+402
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. (This used to be commit 1624ea88e6eef89caacc36e7513aa79df0d579b9)
2007-10-10r14464: Don't include ndr_BASENAME.h files unless strictly required, insteadJelmer Vernooij1-0/+1
try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
2007-10-10r13924: Split more prototypes out of include/proto.h + initial work on headerJelmer Vernooij1-0/+2
file dependencies (This used to be commit 122835876748a3eaf5e8d31ad1abddab9acb8781)
2007-10-10r13739: a fairly major overhaul of the opendb code to allow the BASE-DELETEAndrew Tridgell1-233/+241
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. (This used to be commit cd2602d05725e1734b0862131dd91601c6b6d51a)
2007-10-10r13708: fix compiler warningsStefan Metzmacher1-3/+3
metze (This used to be commit 830c42afda70c616ccd32703c6e7c47f38c2271c)
2007-10-10r13701: removed some unnecessary castsAndrew Tridgell1-5/+5
(This used to be commit f7d0ac936380102e087d4b7c336d7feb68b62314)
2007-10-10r13658: More moving around of files:Jelmer Vernooij1-3/+4
- Collect the generic utility functions into a lib/util/ (a la GLib is for the GNOME folks) - Remove even more files from include/ (This used to be commit ba62880f5b05c2a505dc7f54676b231197a7e707)
2007-10-10r13281: Use TALLOC_CTX * not a void *, and use tmp_ctx as the name for ↵Andrew Bartlett1-58/+59
consistancy. (I was chasing ghosts in this code, and decided to do a cleanup while I was there). Andrew Bartlett (This used to be commit c05f6be09a0cffdd0b87483f5b3751cc3f96e7f5)
2007-10-10r13276: start to work towards the BASE-DELETE test passing. This changeAndrew Tridgell1-11/+22
ensures that we give the right error code to opens that are denied due to the file having delete pending set (This used to be commit c5b709fae66f9135e5c0e2eeb2e25dd8837b64de)
2007-10-10r12694: Move some headers to the directory of the subsystem they belong to.Jelmer Vernooij2-2/+3
(This used to be commit c722f665c90103f3ed57621c460e32ad33e7a8a3)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-2/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r12542: Move some more prototypes out to seperate headersJelmer Vernooij1-0/+3
(This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2)
2007-10-10r10810: This adds the hooks required to communicate the current user from theAndrew Bartlett1-1/+1
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 (This used to be commit fd7203789a2c0929eecea8125b57b833a67fed71)
2007-10-10r10148: Use samdb_base_dn() to find the local domain.Andrew Bartlett1-2/+2
Andrew Bartlett (This used to be commit 4969f86ac29aa1c4371a5cd01551f45c7fdb4cb2)
2007-10-10r7860: switch our ldb storage format to use a NDR encoded objectSid. This isAndrew Tridgell1-71/+26
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. (This used to be commit d40bc2fa8ddd43560315688eebdbe98bdd02756c)
2007-10-10r7621: Trivial reformatting while trying to understand share modes. Still ↵Volker Lendecke1-21/+16
survives smbtorture *DENY* . Volker (This used to be commit da78ed1a4d1f7966d8013278436a710d258879e1)
2007-10-10r7294: implemented the irpc messaging system. This is the core of theAndrew Tridgell2-0/+2
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. (This used to be commit 3d589a09954eb8b318f567e1150b0c27412fb942)
2007-10-10r5988: Fix the -P option (use machine account credentials) to use the Samba4Andrew Bartlett1-7/+7
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 (This used to be commit e13c671619bd290a8b3cae8555cb281a9a185ee0)
2007-10-10r5309: removed ads.h from includes.hAndrew Tridgell1-0/+1
(This used to be commit 196c45b834c39f293b9533cec5cfe5a77382d4e2)
2007-10-10r5307: removed db_wrap.h from includes.hAndrew Tridgell2-0/+2
(This used to be commit 826baec7b348814a7bbdcdbec8c8526514f25da1)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell3-0/+4
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell2-0/+2
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r5137: fix typesStefan Metzmacher1-1/+1
metze (This used to be commit add1c579375d08040f722946da31ee3862f9e7ac)
2007-10-10r5102: This is a major simplification of the logic for controlling top levelAndrew Tridgell2-6/+6
servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e)
2007-10-10r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for theAndrew Tridgell3-4/+4
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
2007-10-10r4547: - added talloc_new(ctx) macro that is a neater form of the common ↵Andrew Tridgell1-6/+6
talloc(ctx, 0) call. - cleaned up some talloc usage in various files I'd like to get to the point that we have no calls to talloc(), at which point we will rename talloc_p() to talloc(), to encourage everyone to use the typesafe functions. (This used to be commit e6c81d7c9f8a6938947d3c1c8a971a0d6d50b67a)
2007-10-10r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p()Andrew Tridgell1-7/+6
(This used to be commit b0f6e21481745d1b2ced28d9ed6f09f6ffd99562)
2007-10-10r4052: fixed a bunch of code to use the type safe _p allocation macrosAndrew Tridgell1-8/+6
(This used to be commit 80d15fa3402a9d1183467463f6b21c0b674bc442)
2007-10-10r4011: get rid of rpc_secdes.h and replace it with a single sane set ofAndrew Tridgell1-12/+17
definitions for security access masks, in security.idl The previous definitions were inconsistently named, and contained many duplicate and misleading entries. I kept finding myself tripping up while using them. (This used to be commit 01c0fa722f80ceeb3f81f01987de95f365a2ed3d)
2007-10-10r3992: provide hooks for lsa to lookup sids allocated using the linear ↵Andrew Tridgell1-0/+61
id->sid mapping (This used to be commit e61140510905b6bbe57ad35dad8e4dd68d1f6bd8)
2007-10-10r3989: added a linear algorithmic mapping for uid->sid and gid->sid withinAndrew Tridgell1-21/+351
our local domain. Note that this linear mapping does not suffer from the "foreign sid" problems of the linear mappings we have previously rejected for the sid->uid problem. the mapping allows for 1 billion automatically allocated users or groups for the local domain. (This used to be commit 8f573439753e2a425305936107442c85cffb9369)
2007-10-10r3982: split out the sid -> uid/gid mapping routines into a ntvfs_sidmapAndrew Tridgell1-0/+212
subsystem. This is in preparation for adding better default ACL generation in pvfs, which will require uid/gid -> sid mapping. (This used to be commit b31108e49247495d98cf7c12ee303b12a9e44e92)
2007-10-10r3969: fix compiler warningsStefan Metzmacher2-6/+6
metze (This used to be commit 7d24b98f3ff55049a7c0d430c15e0a060b4aa2d3)
2007-10-10r3798: added support for alternate data streams in xattrs into pvfs.Andrew Tridgell1-2/+13
The trickiest part about this was getting the sharing and locking rules right, as alternate streams are separate locking spaces from the main file for the purposes of byte range locking, and separate for most share violation rules. I suspect there are still problems with delete on close with alternate data streams. I'll look at that next. (This used to be commit b6452c4a2068cf7e837778559da002ae191b508a)
2007-10-10r3615: split out struct pvfs_file_handle from struct pvfs_file. This is inAndrew Tridgell1-22/+13
preparation for adding code to pass the BASE-DENY1 and BASE-DENYDOS tests, which require a shared filesystem handle for some specific combinations of two DENY_DOS opens on the same connection. (This used to be commit 6e4fdf01d19051e3923d7703dbf990fc1722b09a)
2007-10-10r3597: implement a suggestion from abartlet. By taking a refernce to theAndrew Tridgell1-1/+1
database in the opendb lck, we ensure that the database is not closed before the lock is gone. That ensures the lock destructor doesn't work on a closed database. (This used to be commit 218e01441aa1def3e8e884c8d618a95c9ffdfc1b)
2007-10-10r3539: much nicer async open delay code.Andrew Tridgell1-2/+4
The previous code didn't handle the case where the file got renamed or deleted while waiting for the sharing violation delay. To handle this we need to make the 2nd open a full open call, including the name resolve call etc. Luckily this simplifies the logic. I also expanded the RAW-MUX test to include the case where we do open/open/open/close/close, with the 3rd open async, and that open gets retried after both the first close and the 2nd close, with the first retry failing and the 2nd retry working. The tests the "async reply after a async reply" logic in pvfs_open(). (This used to be commit eded2ad9c91f5ba587ef4f7f5f5a6dceb4b51ff3)
2007-10-10r3528: added support for the SMBntcancel() operation, which cancels anyAndrew Tridgell1-7/+8
outstanding async operation (triggering an immediate timeout). pvfs now passes the RAW-MUX test (This used to be commit 3423e2f41461d054067ef168b9b986f62cc8f77c)
2007-10-10r3507: - added deferred replies on sharing violation in pvfs open. TheAndrew Tridgell2-5/+124
deferred reply is short-circuited immediately when the file is closed by another user, allowing it to be opened by the waiting user. - added a sane set of timeval manipulation routines - converted all the events code and code that uses it to use struct timeval instead of time_t, which allows for microsecond resolution instead of 1 second resolution. This was needed for doing the pvfs deferred open code, and is why the patch is so big. (This used to be commit 0d51511d408d91eb5f68a35e980e0875299b1831)
2007-10-10r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ↵Andrew Tridgell1-0/+1
ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a)
2007-10-10r3387: fixed pvfs to pass the NTDENY tests. The tricky bit wasAndrew Tridgell1-4/+8
SA_RIGHT_FILE_EXECUTE, which depends on a flags2 bit (This used to be commit c36851d230bcf552ed79322f8358060ab164ec09)
2007-10-10r3363: added basic support for SA_RIGHT_FILE_EXECUTE, needed for opening ↵Andrew Tridgell1-7/+19
.dll files (This used to be commit ba1bfd51e1b694cb69afe559f695addaf03b4d81)
2007-10-10r3360: improved the deletion of tmp files. smbd now puts all tmp files in ↵Andrew Tridgell2-4/+3
var/locks/smbd.tmp/ and deletes that dir on startup. (This used to be commit 7e942e7f1bd2c293a0e6648df43a96f8b8a2a295)
2007-10-10r3357: removed the need to use TDB_CLEAR_IF_FIRST in Samba4.Andrew Tridgell2-2/+2
We found a few months ago that TDB_CLEAR_IF_FIRST is extremely inefficient for large numbers of connections, due to a fundamental limitation in the way posix byte range locking is implemented. Rather than the nasty workaround we had for Samba3, we now have a single "cleanup tmp files" function that runs when smbd starts. That deletes the tmp tdbs, so TDB_CLEAR_IF_FIRST is not needed at all. (This used to be commit ffa285bc783c775a2d53a58fb691ca339e6c76ae)
2007-10-10r3312: in the brlock code, we prevent lock stampedes by attempting to notAndrew Tridgell1-1/+3
wakeup all pending locks at once. This change means that we only trigger this anti-stampede code for write locks, as for pending read locks the correct behaviour is to stampede (as they will all succeed) (This used to be commit 8021d1d74207db1204139309592b9d2f80f2bd0e)
2007-10-10r3271: use "struct messaging_context *" instead of "void *" in messaging APIAndrew Tridgell2-4/+4
(This used to be commit cc93813e4a09c538ad485dc2b3cb4c9be34f3d18)
2007-10-10r3189: improved the share_conflict() logic (both in terms of readability andAndrew Tridgell1-24/+50
correctness). pvfs now passes the BASE-RENAME test. (This used to be commit 4cf3f65a5c19fdad62a0bdef225b2d9002cf8c8b)
2007-10-10r3174: added pvfs_is_open() to allow us to check for open files on unlink. WeAndrew Tridgell1-0/+20
now pass BASE-UNLINK. (This used to be commit f23a2f8538bda8f6790e86c93ee22436388b2975)
2007-10-10r3153: pvfs now passes the first 9 of the BASE-DELETE testsAndrew Tridgell1-1/+55
(This used to be commit f8041feaebc9170763ce04d2dd90cfc1c7889c21)
2007-10-10r3147: added basic share modes support for pvfs (or more precisely, ntcreatexAndrew Tridgell1-1/+138
share_access support). This is enough for us to pass the BASE-DENY2 test, but is a long way from fully correct share modes. (This used to be commit b5a6dd3cbf28a3a3b3a3656042ac8f50fca29e1c)