summaryrefslogtreecommitdiffstats
path: root/source3/smbd/connection.c
Commit message (Collapse)AuthorAgeFilesLines
* r4019: better error logging in register_message_flags() from RobGerald Carter2007-10-101-2/+3
| | | | (This used to be commit 5fc0f838e7ec8b29d7987caafe9ffbb8724a3176)
* r1885: tighten the cache consistency with the ntprinters.tdb entry an the in ↵Gerald Carter2007-10-101-1/+0
| | | | | | memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags (This used to be commit 540daf71d8ad189af5dd6d45aa1ce2b3d67da752)
* r1011: fix bad merge (from a few months ago) and ensure that we always use ↵Gerald Carter2007-10-101-4/+4
| | | | | | tdb_open_log() instead of tdb_open_ex() (This used to be commit e65564ab4aa1240e84b8d272510aa770cad0ed0e)
* merge from old APP_HEADGerald Carter2004-02-121-4/+4
| | | | | | | | | | | * remove corrupt tdb and shutdown (only for printing tdbs, connections, sessionid & locking) * decrement smbd counter in connections.tdb in smb_panic() * various Makefile hack to get things to link 'max smbd processes' looks like it might be broken. The counter KEY is not being set. Will look into that tomorrow. (This used to be commit 6e22c5da929b6d9a4e32dc704c83112b2ad8fcfd)
* Got us happy running under valgrind again :-).Jeremy Allison2003-05-311-0/+1
| | | | | Jeremy. (This used to be commit b6ab9d73610861d225d72845d4df7cf970155e39)
* Fixes to stop valgrind complaining about uninitialised memory when it'sJeremy Allison2003-05-311-0/+7
| | | | | | | copying clobbered buffer areas and doing hashes on them and sending them onto the wire. Jeremy. (This used to be commit 7dfcf714ae2e81fece489640e2341f132c9f567d)
* Whitespace syncup.Tim Potter2003-04-141-1/+1
| | | | (This used to be commit 8fe5bab565cdcf498e4d0f5cca31f799d249e3b3)
* (merge from HEAD)Andrew Bartlett2003-03-221-3/+3
| | | | | | | | | | | | | | | | Small clenaup patches: - safe_string.h - don't assume that __FUNCTION__ is available - process.c - use new workaround from safe_string.h for the same - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc() - gencache.c - Keep valgrind quiet by always null terminating. - clistr.c - Add copyright - srvstr.h - move srvstr_push into a .c file again, as a real function. - srvstr.c - revive, with 'safe' checked srvstr_push - loadparm.c - set a default for the display charset. - connection.c - use safe_strcpy() Andrew Bartlett (This used to be commit c91e76bddbe1244ddc8d12b092eba875834029ac)
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-3/+3
| | | | | | | warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-21/+63
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* Sync 3.0 branch with headJelmer Vernooij2002-08-171-2/+6
| | | | (This used to be commit 42615b945e2e48e53a21ea47f2e45407913a6a1e)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Removed MAXSTATUS which was set incorrectly - thus causing tdb traversalJeremy Allison2002-01-141-1/+1
| | | | | | | of the connections db on smbd startup. This should fix the Solaris large load bug.... (fingers crossed). Jeremy. (This used to be commit 5b2b9c25af28543e67762805d1387524cbb6c39d)
* Fix for connectinos.tdb error message from "Richard Bollinger" ↵Jeremy Allison2001-10-161-2/+3
| | | | | | | <rabollinger@home.com> Jeremy. (This used to be commit f1f1a14598be64d4930049691ca970fe93506007)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-3/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* Removed unneeded variable, added comment on deadlock prevention.Jeremy Allison2001-09-191-9/+9
| | | | | Jeremy. (This used to be commit 3f52632ac9c45c66613c3a2fd41f1ba73ca3fefc)
* removed anti-race code that could cause a classic ABBA deadlockAndrew Tridgell2001-09-191-21/+1
| | | | | | I'd rather get the connection count wrong with a small probability than deadlock (This used to be commit d4e4e81328a63d6e3396306d5dae6cc45ddd35d7)
* got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell2001-09-061-1/+1
| | | | (This used to be commit c26e0d3f27a05ecc8bd2390f9aab7f9451524e47)
* Added "use mmap" for HPUX.Jeremy Allison2001-07-301-1/+1
| | | | | Jeremy. (This used to be commit 840802f10677cb0009cb4df4c37c7d01aa5edacd)
* Tidied up calling yield_connection on connection allocation fail.Jeremy Allison2001-07-171-1/+2
| | | | | | Restore debug message to level zero. Jeremy. (This used to be commit 0b13f495b31887d526b46a48a812fa3fd418ce8e)
* Connection record not existing is not a debug level 0.Jeremy Allison2001-07-171-1/+1
| | | | | Jeremy. (This used to be commit d7da59f54eed69d50490205d6233bf4801c16998)
* The big character set handling changeover!Andrew Tridgell2001-07-041-2/+0
| | | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
* Log tdb failures.Jeremy Allison2001-06-081-2/+6
| | | | | Jeremy. (This used to be commit f004471aac3a1a0f2e40c05d1aadfe68456bc103)
* use the new tdb_open_log() fn on connections databaseAndrew Tridgell2001-05-301-1/+1
| | | | (This used to be commit 68c0dcec3d3c17aae76ce093a601c9f452af5a0c)
* Added tdb_errstr() messages so we can see if these functions fail.Jeremy Allison2001-05-231-3/+10
| | | | | Jeremy. (This used to be commit ec64ddac5fa4688b18484d6599b17b8c4bcd34c0)
* groupdb/mapping.c: Fix gcc compiler warning.Jeremy Allison2001-05-171-20/+28
| | | | | | smbd/connection.c: Sync up with code in 2.2 Jeremy. (This used to be commit 87025c223dd33f2e02060c2a5cd45502946c87c6)
* Check sizes of data entries in connections.tdb before deciding they're crecs...Jeremy Allison2001-05-151-0/+3
| | | | | | We will need this when we use finer grained locking for max connections. Jeremy. (This used to be commit c6cd42a6791e26174eb795fd08ddbbd797e5a9cf)
* make the max_connections code less horrendously inefficientAndrew Tridgell2001-05-151-23/+9
| | | | | | | | | | | - it didn't honour the clear flag - it locked the database (not necessary) the previous code would do 10^6 kill() operations for 1000 people logging in - and all with the database locked. Not very scalable. Still haven't added the counter, that would make it really efficient (This used to be commit 6bdbeb4a32e52fb05328dcf38dbb90780e1761ef)
* tdb_traverse returns number of records, not zero, on success.Jeremy Allison2001-05-141-2/+14
| | | | | | Now tested max connections and it works again. Hurrah ! Jeremy. (This used to be commit 6565b8c9781f571735068aba5044a913b5fe31fe)
* Implemented max connections in a similar way to 2.0.x (scan of connection db).Jeremy Allison2001-05-141-5/+83
| | | | | | | This needs testing ! Tidied up tabs in tdb.c. Jeremy. (This used to be commit 0852465053d0c1a23b6cfe6097267291b0595ef8)
* merge from 2.2Andrew Tridgell2001-04-181-773/+0
| | | | (This used to be commit f52a5014ee325f9d91f266f88eac51b6136a75b9)
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-1/+1
| | | | | Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testsuite/printing/psec.c - Use lock directory from smb.conf parameter when peeking at the ntdrivers.tdb file. source/rpc_parse/parse_sec.c - fix typo in debug message source/script/installbin.sh - create private directory as part of 'make install'. source/nsswitch/winbindd_cache.c source/nsswitch/winbindd_idmap.c source/passdb/secrets.c source/smbd/connection.c - always convert tdb key to unix code-page when generating. source/printing/nt_printing.c - always convert tdb key to unix code-page when generating. - don't prepend path to a filename that is NULL in add_a_printer_driver_3(). source/rpc_server/srv_spoolss_nt.c - always convert tdb key to unix code-page when generating. - don't prepend server name to a path/filename that is NULL in the fill_printer_driver_info functions. source/printing/printing.c - always convert tdb key to unix code-page when generating. - move access check for print_queue_purge() outside of job delete loop. source/smbd/unix_acls.c - fix for setting ACLs (this got missed earlier) source/lib/messages.c - trivial sync with appliance_head (This used to be commit 376601d17d53ef7bfaafa576bd770e554516e808)
* Patch from Richard Bollinger for dead entries being left in connections tdb.Jeremy Allison2001-01-081-1/+1
| | | | | Jeremy. (This used to be commit 48a3afcd4716a456c3072bf41450b361e4379be8)
* Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. MergedJeremy Allison2000-12-151-0/+9
| | | | | | | in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy. (This used to be commit 0a40bc83e14c69a09948ec09bb6fc5026c4f4c14)
* fixed the problem with messages not getting throughAndrew Tridgell2000-11-171-3/+0
| | | | | | | | | | | the problem had nothing to do with being your own pid, it was instead a problem with IPC$ connections not being registered in the connections database and an incorrect test for -1 in the messaging code. These changes also mean that IPC$ shares now show up in smbstatus. That is probably a good thing. (This used to be commit 3575ad10985a18f897e38179ca69fa9a49a7ea02)
* David Lee's utmp patch (finally). Thanks David !Jeremy Allison2000-10-281-84/+594
| | | | | Jeremy. (This used to be commit b809a2d0c81c54e917ccc0c99b3e70ea8d7ceab1)
* patch from Dominik Kubla <dominik.kubla@uni-mainz.de>Andrew Tridgell2000-05-101-3/+3
| | | | (This used to be commit 9c598e571decb449607042ba9628f68de9b45043)
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-3/+3
| | | | | | of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-4/+2
| | | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed. (This used to be commit 5937ab14d222696e40a3fc6f0e6a536f2d7305d3)
* utmp compile fix from peter@cadcamlab.orgAndrew Tridgell2000-04-101-2/+2
| | | | (This used to be commit c0562a02c345c3eb7d9a26b85bef454355023ba3)
* rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xxJeremy Allison2000-03-251-32/+84
| | | | | | | calls. smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>. Jeremy. (This used to be commit 53721fbc7d2a986cf999b8f031a2d9003c0dccae)
* acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison2000-03-221-0/+2
| | | | | | | | | | | | | | | include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
* Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.Jeremy Allison2000-01-121-0/+212
| | | | | Jeremy. (This used to be commit 95d37a1d25d56316c80eec54aea1f358cd621d4c)
* don't close the database after each claim_connection()Andrew Tridgell2000-01-031-2/+0
| | | | (This used to be commit d5ceb2972b65c261cfb04b6dcccb3ace9f2238a7)
* - added tdb_flags option to tdb_open()Andrew Tridgell2000-01-021-22/+6
| | | | | | | | | | - added TDB_CLEAR_IF_FIRST flag to clear the database if this is the first attached process. Useful for non-persistent databases like our locking area (this will also make upgrades to new database layouts easier) - use lock_path() in a couple of places - leave connections database open while smbd running - cleaned up some tdb code a little, using macros for constants (This used to be commit 00e9da3ca577527db392aced62f02c69cfee8f4f)
* converted all our existing shared memory code to use a tdb databaseAndrew Tridgell1999-12-211-23/+4
| | | | | | | | | | | | | | instead of either sysv or mmap shared memory or lock files. this means we can now completely remove locking_shm.c locking_slow.c shmem.c shmem_sysv.c and lots of other things also got simpler locking.c got a bit larger, but is much better compartmentalised now (This used to be commit e48c2d9937eea0667b8cd3332e49c06314ef31e7)
* first cut at using the tdb code for the connections structure, theAndrew Tridgell1999-12-211-155/+70
| | | | | | SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago! (This used to be commit 4951755413c11d4c5b9af4699a6e622056d52433)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-7/+7
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-3/+3
| | | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)