summaryrefslogtreecommitdiff
path: root/source3/smbd/statcache.c
AgeCommit message (Collapse)AuthorFilesLines
2003-03-17Add copyright.Andrew Bartlett1-1/+1
(This used to be commit a7f9c3657ff052e382e290059f50f1d9812b8221)
2003-03-17Brain fart - make sure we truncate the right string...Andrew Bartlett1-4/+4
Andrew Bartlett (This used to be commit 32eb2cdca62a784d96207507e273bbbf77b0c6c3)
2003-03-17More statcache fixes - and add a bit more doco.Andrew Bartlett1-9/+25
Andrew Bartlett (This used to be commit 0e8dd52f6973ac5219e2c2dd53824de71f512083)
2003-03-17Fix memory leaks and add parinoioa code to our stat() cache.Andrew Bartlett1-2/+23
Andrew Bartlett (This used to be commit 3fd07bd25eefdb2a7a6891fa1169ab2425607249)
2003-03-16New statcache internals - this time it's actually possible to follow what'sAndrew Bartlett1-54/+82
going on. In particular, add doxygen documentation. Andrew Bartlett (This used to be commit 7ff77ab46c63eca3b6edf18f39024eadb83a1a90)
2003-03-15String handling parinoia fixes.Andrew Bartlett1-6/+6
This patch enables the compile-time checking of strings assable by means of sizeof(). (Original code had the configure check reversed). This is extended to all safe_strcpy() users, push_string and pull_string, as well as the cli and srv derivitives. There is an attempt to cap strings at the end of the cli buffer, and clobber_region() of the speified length (when not -1 :-). Becouse of the way they are declared, the 'overmalloc a string' users of safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips some of the checks). This whole ball of mud worked fine, until I pulled out my 'fix' for our statcache. When jeremy fixes that, we should be able to get back to testing this stuff. This patch also includes a 'marker' of the last caller to clobber_region (ie, the function that called pstrcpy() that called clobber_region) to assist in debugging problems that may have smashed the stack. This is printed at smb_panic() time. (Original idea and patch by metze). It also removes some unsused functions, and #if 0's some others that are unused but probably should be used in the near future. For now, this patch gives us some confidence on one class of trivial parsing error in our code. Andrew Bartlett (This used to be commit 31f4827acc2a2f00399a5528fc83a0dae5cebaf4)
2003-03-03Another pstrcpy() into malloc()ed buffer fix.Andrew Bartlett1-2/+2
Andrew Bartlett (This used to be commit bd0c84d60b703e89081838a7cfa1eb1b4f45ad0a)
2003-02-10Some cleanups:Andrew Bartlett1-2/+2
- Don't use pstrcpy into an allocated string - use safe_strcpy() directly instead. - Keep a copy of the 'server_info' attached to the vuid. In future use this for things like the session key, homedir and full name instead of current copies. - Try to avoid memory leak/segfault on Realloc failure - clear up #endif comments Andrew Bartlett (This used to be commit 162477bb086827950b6cb71afa9bef62c2753c2e)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2001-09-25fixed a typoAndrew Tridgell1-1/+1
(This used to be commit 11a2808e10bb7885da04c19c261d3876c31ac08d)
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-1/+1
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-05-12statcache initialisation fixAndrew Tridgell1-5/+5
pointed out by Elrond (This used to be commit 572a37534b7ee010aafd7e8bcb9da52957306f97)
2000-11-27Removed unnessesary init.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 2a797f9aa26b2d0c703b9d67f6e1ec97e4f408d2)
2000-11-21Fix for updating of print queues changed from a local box. Essentially,Jeremy Allison1-1/+1
this makes sure that the change messages sent to ourselves are handled synchronously w.r.t. other smb packets incoming. Jeremy. (This used to be commit 78a13074455618308d048d1c69f62e660988eb90)
2000-10-19Ok - this is a big patch - and it may break smbd a bit (althoughJeremy Allison1-1/+1
I hope not). If you encounter strange file-serving behavior after this patch then back it out. I analysed our stat() usage and realised we were doing approx. 3 stat calls per open, and 2 per getattr/setattr. This patch should fix all that. It causes the stat struct returned from unix_convert() (which now *must* be passed a valid SMB_STRUCT_STAT pointer) to be passed through into the open code. This should prevent the multiple stats that were being done so as not to violate layer encapsulation in the API's. Herb - if you could run a NetBench test with this code and do a padc/par syscall test and also run with the current 2.2.0 code and test the padc/par syscalls I'd appreciate it - you should find the number of stat calls reduced - not sure by how much. The patch depends on unix_convert() actually finding the file and returning a stat struct, or returning a zero'd out stat struct if the file didn't exist. I believe we can guarentee this to be the case - I just wasn't confident enough to make this an assertion before. Ok ok - I did write this whilst at the Miami conference..... sometimes you get a little free time at these things :-). Jeremy. (This used to be commit 66a5c05ec46b641224fbe01b30bd7e83571a2a1b)
2000-10-06Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison1-27/+6
We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy. (This used to be commit dfe77c7046cbd65ee52aea7439f21503c1eac41d)
2000-10-06Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison1-1/+1
a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy. (This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-10-04Made re-init of stat cache explicit rather than being hidden.Jeremy Allison1-1/+2
Jeremy. (This used to be commit b0c40236bb4381fec0e812c20e5f8c09ebf005f9)
2000-05-04if the stat cache is off then don't initialise itAndrew Tridgell1-0/+2
(This used to be commit cd5dcd9e659a7255f03eb496c0202986375e73a6)
2000-05-02fixed a memory leak (calling hash_table_init twice)Andrew Tridgell1-1/+7
(This used to be commit 610fcef4d33db2b62e6298bdb68546a2411d03b1)
2000-04-30- removed all our old wildcard matching code and replaced it with aAndrew Tridgell1-0/+243
call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much (This used to be commit 03e9cea004bbba72161a5323cf3b4556c94aed8e)