summaryrefslogtreecommitdiff
path: root/source/smbd/connection.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge of (apparently working :-) new printing notify code.Jeremy Allison2002-09-041-15/+56
| | | | Jeremy.
* Add bcast_msg_flags to connection struct. Allows sender to filter whenJeremy Allison2002-09-041-6/+7
| | | | | | sending broadcast messages. Also initial cut-down of printing notify messages (not yet finished). Jeremy.
* Make 'remote_machine' private to lib/substitute.c, and fix all the user to useAndrew Bartlett2002-08-111-2/+1
| | | | | | the new accessor functions. Andrew Bartlett
* Merge of print notify fixes from APPLIANCE_HEAD.Tim Potter2002-08-021-0/+5
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* 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.
* Fix for connectinos.tdb error message from "Richard Bollinger" ↵Jeremy Allison2001-10-161-2/+3
| | | | | | <rabollinger@home.com> Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-3/+0
|
* Removed unneeded variable, added comment on deadlock prevention.Jeremy Allison2001-09-191-9/+9
| | | | Jeremy.
* 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
* got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell2001-09-061-1/+1
|
* Added "use mmap" for HPUX.Jeremy Allison2001-07-301-1/+1
| | | | Jeremy.
* Tidied up calling yield_connection on connection allocation fail.Jeremy Allison2001-07-171-1/+2
| | | | | Restore debug message to level zero. Jeremy.
* Connection record not existing is not a debug level 0.Jeremy Allison2001-07-171-1/+1
| | | | Jeremy.
* 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.
* Log tdb failures.Jeremy Allison2001-06-081-2/+6
| | | | Jeremy.
* use the new tdb_open_log() fn on connections databaseAndrew Tridgell2001-05-301-1/+1
|
* Added tdb_errstr() messages so we can see if these functions fail.Jeremy Allison2001-05-231-3/+10
| | | | Jeremy.
* groupdb/mapping.c: Fix gcc compiler warning.Jeremy Allison2001-05-171-20/+28
| | | | | smbd/connection.c: Sync up with code in 2.2 Jeremy.
* 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.
* 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
* 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.
* 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.
* merge from 2.2Andrew Tridgell2001-04-181-773/+0
|
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-1/+1
| | | | Jeremy.
* 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
* Patch from Richard Bollinger for dead entries being left in connections tdb.Jeremy Allison2001-01-081-1/+1
| | | | Jeremy.
* 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.
* 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.
* David Lee's utmp patch (finally). Thanks David !Jeremy Allison2000-10-281-84/+594
| | | | Jeremy.
* patch from Dominik Kubla <dominik.kubla@uni-mainz.de>Andrew Tridgell2000-05-101-3/+3
|
* 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.
* 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.
* utmp compile fix from peter@cadcamlab.orgAndrew Tridgell2000-04-101-2/+2
|
* 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.
* 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.
* Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.Jeremy Allison2000-01-121-0/+212
| | | | Jeremy.
* don't close the database after each claim_connection()Andrew Tridgell2000-01-031-2/+0
|
* - 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
* 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
* 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!
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-7/+7
|
* 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.
* Fixed sys_lseek and seek_file calls so all returnsJeremy Allison1998-10-181-1/+5
| | | | | are *checked* :-). Jeremy.
* More 64 bit stuff - now the fcntl locks are 64 bit clean.Jeremy Allison1998-09-041-9/+9
| | | | | | Nearly at the stage where I can expose the 64-bit-ness to the NT clients.... Jeremy.
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy.
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-11/+13
| | | | | | | | 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 is a security audit change of the main source.Jeremy Allison1998-05-121-6/+6
| | | | | | | | | | | | | | | | | | It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy.
* this isn't a big commit, it just looks like it :-)Andrew Tridgell1998-03-171-1/+2
| | | | | | | | | I needed the client_name() and client_addr() functions in swat so I could tell who was connecting from where. The problem was that these functions didn't take a file descriptor parameter they just used the global "Client". So I needed to change all calls to pass a parameter ... lots of files.
* - added the ability to kill off individual connections from SWAT (fromAndrew Tridgell1998-03-151-0/+221
the status page) - split the claim_connection() code into its own file - fixed the claim_connection() code to lock the file when manipulating it - always claim a null connection at startup - fixed a bug in the pidfile code