summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
1998-08-31bounds check next_token() to prevent possible buffer overflowsAndrew Tridgell4-19/+19
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
1998-08-28This checking fixes the statcache bug that stopped NetBench from runningJeremy Allison2-7/+15
correctly. Added new parameter "stat cache size" - set to 50 by default. I now declare the statcache code officially "open" for business :-). It gets a hit rate of 97% with a NetBench run and seems to make using a case insensitive run as efficient as a case sensitive run. Also tidied up our sys_select usage - added a maxfd parameter and also added an implementation of select in terms of poll(), for systems where poll() is much faster. This is disabled by default. Jeremy. (This used to be commit 779b924ec1f6c81ff578d22295b20fece698d1fc)
1998-08-27Fixed stat cache statistics calculation. Oops.Jeremy Allison1-1/+1
Jeremy. (This used to be commit d6a9087e7e626e6e07503dba38854b136fe70c23)
1998-08-27This is the stat cache code - seems to work fine (needs heavyJeremy Allison7-50/+312
NetBench testing though.... :-). Attempts to efficiently reduce the number of stat() calls Samba does. Jeremy. (This used to be commit d0e48a2d8072c3e77a57ac6a2fb5044c05f03b41)
1998-08-25changed the default permissions code to do this:Andrew Tridgell1-12/+1
if ((sbuf->st_mode & S_IWUSR) == 0) result |= aRONLY; rather than the very complex user/group permissions checks we do currently. This is equivalent ot setting "alternate permissions = yes" in the old code. The change is motivated by three main reasons: 1) it's basically impossible to second guess whether a file is writeable without trying to open it for writing. ACLs, root squash etc just make it too hard. 2) setting it not RONLY if the owner can write is closer to what NT does (eg. look at a cdrom - files are not marked read only). 3) it prevents the silly problem of copying files from a read only share to a writeable share and then finding you can't write to them as windows preserves the RONLY flag. Lots of people get bitten by this when they drag a folder from a Samba drive. It also hurts some install programs. I have also added a new flag type for loadparm.c called FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon add code to testparm to give a warning about deprecated options. (This used to be commit c4363a12fdc0be329ca2bfeb1d7b89bfe90031dc)
1998-08-25Added code to (correctly) ignore TRANSACT2_SETFILEINFO with ↵Jeremy Allison2-2/+4
SMB_SET_FILE_ALLOCATION_INFO. Office 97 expects this call to succeed when you tell it you do NT SMB calls. Jeremy. (This used to be commit 260e7e27401d863e9f580d4748c577334d9fc9d0)
1998-08-24Changed ASSERT macros to SMB_ASSERT macros as some systems alreadyJeremy Allison2-3/+3
have an ASSERT macro defined. Jeremy. (This used to be commit dbe6ad014a8b5dcbf17d7cd9865650c2e040d666)
1998-08-22added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberallyAndrew Tridgell1-7/+1
in the rpc code. (This used to be commit e6ce1c5b5a9f29d8fcbbd23019186ff5c600e795)
1998-08-21nmbd and smbd had different behavior with respect to log files. nmbd wouldChristopher R. Hertel1-7/+11
default to overwrite and smbd would default to append. Also, the -a option (actually a toggle, such that "-a -a" would set the default) was documented as append mode for nmbd, and *overwrite mode* for smbd. nmbd now defaults to append mode, to match smbd. The -a option now always means append, and I've added the -o option to both, meaning overwrite. Note that the change to nmbd's default behavior may confuse some people. I've not seen anything about 2.0.0 changes in the WHATSNEW.txt file. Where would I document a change like this? Chris -)----- (This used to be commit b1d374fb14b1fb92a84260f1dcc59a39a4b99a3d)
1998-08-21don't attempt to answer QFILEINFO/SMB_QUERY_FILE_STREAM_INFO queries -Andrew Tridgell1-0/+4
if we do then NTws gets a BSOD. I checked and NT server refuses these queries too :) (This used to be commit d2fb7ee8f55dd1ff25fca46e18b02a05bc2b71ae)
1998-08-21added new smb.conf option "panic action". see my samba-technicalAndrew Tridgell1-3/+1
explanation. (This used to be commit c6899df44c34088a4d2bf1edc840320b0ba7e32e)
1998-08-21fixed a bug in trans2_qfilepathinfo() where we used the length of theAndrew Tridgell1-0/+4
basename of a file but the whole file name. silly error. (This used to be commit 6e00de7a1d3d5f9fa9bcc40db119fcb8602165c9)
1998-08-21Fixes for the problem in blocking locks with file_fsp returning theJeremy Allison3-32/+51
chain_fsp on close (if you don't know what this means, consider yourself lucky - this one took a day to track down :-). Jeremy. (This used to be commit 193cb5382464173e99a538867a266d793f0ceab5)
1998-08-20Turning on blocking locking code. NB. Blocking lock requests that are notJeremy Allison6-86/+316
the head of an SMB request (ie. are part of a chain) will not be queued - this will be fixed when we move to the new chain code. In practice, this doesn't seem to cause much of a problem (in my admittedly limited testing) bug a debug level zero message will be placed in the log when this happens to help determine how real the problem is. smbd/locking.c: New debug messages. smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX smbd/chgpasswd.c: Fix for master fd leak. smbd/files.c: Tidyup comment. smbd/nttrans.c: Added fnum to debug message. smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking lock queue processing into idle loop. smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX. Jeremy. (This used to be commit e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b)
1998-08-19Blocking lock code split out...Jeremy Allison1-0/+375
Jeremy. (This used to be commit 9cdb148ef56dc8f74891f5c6e9cae10142bd4c6e)
1998-08-19Makefile.in: Moved blocking lock code into smbd/blocking.c for link purposes.Jeremy Allison4-117/+176
include/includes.h: Added nterr.h. locking/locking.c: Moved blocking lock code into smbd/blocking.c for link purposes. smbd/close.c: Added blocking lock removal to file close. smbd/filename.c: Tidied up unix_convert() so I could read it (:-) in preparation for the stat_cache code. smbd/nttrans.c: Added WRITE_ATTRIBUTES check. smbd/reply.c: Fixed multibyte char problem in wildcard mask. Jeremy. (This used to be commit 148eaba3dadb1d0bd3ac3ef53da3d9811636e89a)
1998-08-17smbd/nttrans.c: Fixed bug in split off pipe code.Jeremy Allison1-0/+4
locking/locking.c: More blocking lock changes. Jeremy. (This used to be commit 2ca4fc95a4227645f1009a057d46b58508846a92)
1998-08-17Fixed bug introduced by the recent changes where the chain_fnumJeremy Allison3-171/+193
could be overwritten in oplock processing code. Jeremy. (This used to be commit 908a583b48e37c5e869216f4dc92d4a587ff1238)
1998-08-17removed some of the rough edges from the splitupAndrew Tridgell2-435/+456
(This used to be commit 722312c326d54849e2552327fcd88ac77257ad2c)
1998-08-17move soem variables from server.c that don't belong there.Andrew Tridgell4-51/+30
(This used to be commit f92475aa3cb3ade576c39c02c7996c949c42082a)
1998-08-17this completes the splitup of server.c.Andrew Tridgell8-3322/+3523
the splitup was done with an axe, not a scalpel, so there are some rough edges. I mostly wanted to get the general form right with fine tuning of what goes where to come later. Still, this is better than what we had before where server.c was a general repository for anything that didn't fit elsewhere. (This used to be commit a6d194886a4a5f7507fa37289ff96c1be56f14a6)
1998-08-17more splitting of server.cAndrew Tridgell4-557/+610
created dosmode.c and filename.c (This used to be commit 534a90ca44641417c21f6ed6d4b94b1de60f808d)
1998-08-17now that we have no global arrays we can start to split up the monsterAndrew Tridgell3-485/+532
server.c without breaking things. this splits off netprot.c and fileio.c for negprot and read/write/seek handling respectively. (This used to be commit b3d7014643ec9f2eef6e6f598f5b9db1fe2f930d)
1998-08-17added some optimisation for the case where the number of open files isAndrew Tridgell2-50/+24
very large. files.c now promotes a files_struct to the top of the list if it is used when it is more than 10 elements from the top. also moved common linked list code for the 5 sets of linked lists that I've created over the past few days into dlinklist.h (I've explained to Chris why I didn't use the ubiqx code) (This used to be commit 1eb9ae2996b5a243a147f485e7e353d54f820852)
1998-08-17moved connection_struct handling code into smbd/conn.c and changed itAndrew Tridgell4-128/+227
to a linked list with bitmap format. (This used to be commit b7aaab1b6b2d2f72b2bb7c11f5c7bf081a6093d9)
1998-08-17much cleaner chain pointer handling for both files and pipes.Andrew Tridgell6-60/+67
the chain pointer is now stored as a static and is set whenever a handle is created or extracted. This also makes the code less error prone. (This used to be commit 068a862982bea726e8d7b1b4065d510b9840a272)
1998-08-17some cleanups from the conversion of Pipes[] to a linked list. I alsoAndrew Tridgell5-134/+114
removed most cases where a pnum is used and substituted a pipes_struct*. in files.c I added a offset of 0x1000 to all file handles on the wire. This makes it much less likely that bad parsing will give us the wrong field. (This used to be commit 8bc2627ff28d340db65bfa017daca2dc291d5ef7)
1998-08-16- some tidying up in files.cAndrew Tridgell3-11/+10
- handle null fsp in DEBUG() at end of reply_ntcreate_and_X(). Jeremy, can you fix this properly? - get snum right in print queue code in ipc.c (it was broken by my connections_struct changes). (This used to be commit b3dd3785751db2d5d0a80ffac9c3df01c9909891)
1998-08-16got rid of the Files[] array completely (previously I'd just made itAndrew Tridgell4-151/+212
private to files.c) It now is a doubly linked list with a bitmap for allocated file numbers. Similarly for the fd_ptr code. I also changed the default maximum number of open files to 4096. The static cost is 1 bit per file. It all seems to work, and it passes the "does Sue scream" test, but if you see weird behaviour then please investigate. With the volume of new code that has gone in there are bound to be one or two bugs lurking. note that you must do a "make clean" before building this as many data structures have changed in size. (This used to be commit 79755ce97004b787d7e83a8d18fc4c7c003b7231)
1998-08-16server.c: fixed a bug in close_file() with the new files.c handling codeAndrew Tridgell1-15/+14
bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand (This used to be commit f573a65b67e7a57586fec57845598e49b157ee0a)
1998-08-16changed find_free_file() to file_new().Andrew Tridgell4-11/+11
(This used to be commit 3daee29636dcb2d99a0e7c08179a098befae00dc)
1998-08-15this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell7-806/+820
in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands. (This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582)
1998-08-15configure: Changes for extra headers.Jeremy Allison8-28/+28
configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy. (This used to be commit 1b9cbcd02e575dc0a95fa589f720df30a4acc46b)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell13-2946/+2648
Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
1998-08-13Debug output formatting change. I'm trying to combine log lines thatChristopher R. Hertel1-4/+4
really should be together. Chris -)----- (This used to be commit 8880fc58fa61edfd5a83cc75ef627b430b8a4437)
1998-08-11include/smb.h: Removed dir_ptr. Not needed.Jeremy Allison4-93/+95
locking/locking.c: First cut a blocking lock code. #ifdef'ed out for now. locking/locking_shm.c: Removed dir_ptr. Not needed. smbd/nttrans.c: More work on ChangeNotify - return is not an error and needs to be handled as a nttrans with zero params. Removed dir_ptr. Not needed. smbd/reply.c: smbd/server.c: smbd/trans2.c: Removed dir_ptr. Not needed. Hmmm. At the moment smbclient is broken - doesn't issue prompt correctly. This needs looking at. Jeremy. (This used to be commit ddfbcc05815621d3c463f92faed047f126412342)
1998-08-11Makefile.in: Added CHECK target back in (at Herb's request). AddedJeremy Allison1-1/+13
manpath in (although we don't currently use it). client/client.c: Added John Blair's fixes for "put -". include/nterr.h: Added NT_STATUS_NOTIFY_ENUM_DIR error code. smbd/nttrans.c: Added in devious fix for one-shot NT change notify bug. Jeremy. (This used to be commit 4ac3091e57e9ab234b3c051333ba521a92defa99)
1998-08-10Makefile.in: Fixed make clean bug with CVS directory in bin/.Jeremy Allison1-0/+19
include/smb.h: Fixed bugs in Debug macro's with SGI compiler. smbd/trans2.c: Fixed bug reported by Zoltan Palmai <ZSPA@chevron.com> PR#8903 where get_lanman2_dir_entry() could return a mangled name as a resume key and call_trans2findnext() wasn't doing the same. Jeremy. (This used to be commit 9d010e721c27af1d9498fd1e147993ba8ac8b41e)
1998-08-10moved access.c into lib/ from smbd/ as it is needed by testparm. IAndrew Tridgell1-3/+9
modified it not to need any smbd specific structures and instead pass things from smbd. (This used to be commit 162141d3b3fcf53fbc6a1f18702df85c2b7f1781)
1998-08-10split the system password checking routines out of smbd/password.c andAndrew Tridgell2-1042/+143
into passdb/pass_check.c. This means SWAT no longer needs to link to smbd/password.c (This used to be commit 90d93889d722670cbb517017531264630af759bf)
1998-08-09this gets smbd compiling and linking correctly with the new layout.Andrew Tridgell4-599/+18
(This used to be commit d08fa39cec5c71a9034dbf4241fc7e195f1bbaa5)
1998-08-09added ignore rules for the dummy filesAndrew Tridgell1-0/+1
(This used to be commit 687f76a17d6d3ebd33b4d9a848deef56f3c1f56a)
1998-08-09these dummy files are needed for autoconf processingAndrew Tridgell1-0/+0
(This used to be commit be762dc3de6c1ef768790522dfe93007a61ce5d7)
1998-08-05Fixed memory leak when freeing ChangeNotify structures.Jeremy Allison1-6/+6
Jeremy. (This used to be commit 996c5ac97a8d1443bc8abc59b9a10ff3aeb77389)
1998-08-04nttrans.c: Fix change_notify. Queue processing code wasn't changing toJeremy Allison2-18/+54
the correct directory before doing the stat. Doh ! uid.c: Fix for performance in security=share mode. Invalid vuid meant that in security=share mode Samba was always doing the become_user/ undebome_user pairs for *every* smb. This code fixes it, but tridge should review for security implications. Jeremy. (This used to be commit c3663379fdcec487feea2e5d848ee012ee6c6baf)
1998-08-04loadparm.c: Added "debug timestamp" synonym for Chris.Jeremy Allison3-39/+28
nttrans.c: Moved common code into function in server.c Removed left over debug level 0. server.c: Moved common code into function in server.c Jeremy. (This used to be commit 34ef55b7228155cef40cbdfcdc1fe623c1037bd6)
1998-08-03First implementation of ChangeNotify - this version only checksJeremy Allison2-20/+297
for changes in the directory modify timestamps. A better version will look at the requested client flags, and create a hash that represents the current state of the directory, and check against this instead. debug.c: Added lp_timestamp_logs() function. loadparm.c: Added "change notify timeout" in seconds (default 60) - this is the scan rate for a directory. Added ""timestamp logs" boolean - default True. Turns off log timestamps (so I can read them :-). nttrans.c: ChangeNotify implementation. server.c: ChangeNotify implementation. shmem_sysv.c: Added exits on shmem errors (without them smbd can core dump if some calls fail). smb.h: Added ChangeNotify flags for future use. util.c: Tidied up typedef. Jeremy. (This used to be commit a0748c3f53974483680ebe2ea4f556ece8d7fa43)
1998-07-31As per a Andrew's message, I went through and removed the timestring()Christopher R. Hertel9-237/+280
timestamps from several DEBUG messages. The timestamps are redundant now that DEBUG() provides them automatically. There are still a few more files to do, but I've got to get home for dinner. Chris -)----- (This used to be commit 60286ccecaa6028d687e6406755016455e3b3a26)
1998-07-30Makefile.in: Moved UBIQX stuff into UTILOBJ.Jeremy Allison4-217/+332
loadparm.c: Added "ole locking compatibility" option (default "true"). locking.c: Changes to implement union in files_struct. locking_shm.c: Changes to implement union in files_struct. nttrans.c: Made opening a directory explicit (we have to). Added create directory code for nttrans. reply.c: Changes to implement union in files_struct. server.c: Changes to implement union in files_struct. Added create directory code. trans2.c: Changes to implement union in files_struct. smb.h: Changes to implement union in files_struct. util.c: Changed linked list code to UNIQX linked list. This will make the other lists I need to implement for ChangeNotify and blocking locks easier. Jeremy. (This used to be commit 3a5eea850bb256b39cff8ace1e4fb4e0c1f5472b)
1998-07-29get rid of the runtime test for broken getgroups() and add a compileAndrew Tridgell3-85/+37
time test instead. This also allows us to get rid of the igroups element of a couple of structures. (This used to be commit 8b25fe734166b76ceebf8d9543c706ebe0fddc96)