summaryrefslogtreecommitdiffstats
path: root/source/smbd/session.c
Commit message (Collapse)AuthorAgeFilesLines
* Wrap the unix token info in a unix_user_token in auth_serversupplied_infoVolker Lendecke2008-06-191-2/+2
| | | | No functional change, this is a preparation for more current_user ref removal
* Remove "userdom_struct user" from "struct user_struct"Volker Lendecke2008-05-051-1/+1
|
* Remove "guest" from "struct user_struct"Volker Lendecke2008-05-051-1/+1
|
* Remove the unix token info from "struct user_struct"Volker Lendecke2008-05-051-2/+2
|
* Remove most of the remaining globals out of lib/util_sock.c.Jeremy Allison2007-11-031-3/+4
| | | | | | I have a plan for dealing with the remaining..... Watch this space. Jeremy.
* I can't get away without a 'length' arg. :-).Jeremy Allison2007-11-031-2/+2
| | | | Jeremy.
* Stop get_peer_addr() and client_addr() from using globalJeremy Allison2007-11-031-2/+3
| | | | | statics. Part of my library cleanups. Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-3/+3
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* Add const to the get_peer_addr() and get_socket_addr()Jeremy Allison2007-10-111-1/+1
| | | | | calls. Use the IPv6 varient for get_peer_addr(). Jeremy.
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.samba-misc-tags/initial-v3-2-testGerald (Jerry) Carter2007-10-101-4/+1
|
* r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal withJeremy Allison2007-10-101-16/+9
| | | | | | the ripple effects this causes. utmp has to change etc. Remove some global varables and store address/port in the unexpected db. Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23236: Another bad merge: Correctly free and unlock the session record inVolker Lendecke2007-10-101-1/+2
| | | | | | | | session_claim. Jerry, this fixes the hanging smbstatus. Sorry for that, Volker
* r23220: Add traverse_read to dbwrapVolker Lendecke2007-10-101-1/+1
|
* r23173: Convert sessionid.tdb to ctdb. The 3.0.26 patch is a bit larger becauseVolker Lendecke2007-10-101-53/+118
| | | | it brings across the tdb-based list_sessions
* r23172: Change shutdown_other_smbds to use connections_traverse instead ofVolker Lendecke2007-10-101-2/+3
| | | | session_traverse.
* r22751: Next step for the cluster merge: sessionid.tdb should contain a 'structVolker Lendecke2007-10-101-1/+1
| | | | server_id' instead of a 'uint32 pid'
* r22561: Fix a memleak in lanman.c: Nobody would free the session_list.Volker Lendecke2007-10-101-2/+6
| | | | Volker
* r22020: Make it more clear that both the vuser struct and it's contents areAndrew Bartlett2007-10-101-2/+2
| | | | | | | | | talloc_free()'ed at the end of a session. Rework the passwd cache code to use talloc_unlink and talloc_reference, to more carefully manage the cache. Andrew Bartlett
* r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher2007-10-101-1/+1
| | | | | | and fix all compiler warnings in the users metze
* r21980: make use of tdb_*_bystring() and string_term_tdb_data() in smbd/Stefan Metzmacher2007-10-101-16/+5
| | | | | | to avoid creating the TDB_DATA struct from strings "by hand" metze
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-11/+34
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2007-10-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r11909: Implement 'reset on zero vc'. This kills other connections when a ↵Volker Lendecke2007-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | session setup comes in with the vc (virtual connection) field set to zero. This is done by Windows, probably you can tweak that by some registry key. This boolean option controls whether an incoming session setup should kill other connections coming from the same IP. This matches the default Windows 2003 behaviour. Setting this parameter to yes becomes necessary when you have a flaky network and windows decides to reconnect while the old connection still has files with share modes open. These files become inaccessible over the new connection. The client sends a zero VC on the new connection, and Windows 2003 kills all other connections coming from the same IP. This way the locked files are accessible again. Please be aware that enabling this option will kill connections behind a masquerading router. Volker
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-3/+3
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r1011: fix bad merge (from a few months ago) and ensure that we always use ↵Gerald Carter2007-10-101-2/+2
| | | | tdb_open_log() instead of tdb_open_ex()
* Fix the "too many fcntl locks" scalability problem raised by tridge.Jeremy Allison2004-02-191-10/+19
| | | | | | I've now tested this in daemon mode and also on xinetd and I'm pretty sure it's working. Jeremy.
* merge from old APP_HEADGerald Carter2004-02-121-2/+2
| | | | | | | | | | * 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.
* * add in David Lee's utmp patch (defaults to on if available)Gerald Carter2003-06-061-6/+0
| | | | * one more try at fixing builds when --with-ldap=no
* spellingTim Potter2003-05-141-1/+1
|
* inet_pton isn't portable, so use interpret_addr2.Andrew Bartlett2003-04-281-3/+3
|
* When possible, store the IP address of the connecting client, not just theAndrew Bartlett2003-04-241-1/+10
| | | | | | | | | | hostname. This makes 'last -i' show the IP. Thanks to Philip Anderson <pza@australia.op.org> for the idea. Andrew Bartlett
* Sync 3.0 branch with headJelmer Vernooij2002-08-171-26/+48
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-7/+45
|
* Correctly store the hostname of the remote machine if so configured. If theAndrew Bartlett2002-03-231-4/+6
| | | | reverse DNS fails, then store the IP.
* Do the reverse DNS lookup, but only if 'hostname lookups = yes'Andrew Bartlett2002-02-091-5/+7
| | | | Andrew Bartlett
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Don't resolve the hostname in smbd as we can pause for a long time whileTim Potter2001-11-191-3/+6
| | | | | waiting for DNS timeouts to occur. The correct place to do this is in the code that displays the session information.
* Change to guest logon code.Andrew Bartlett2001-11-081-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This changes the way we process guest logons - we now treat them as normal logons, but set the 'guest' flag. In particular this is needed becouse Win2k will do an NTLMSSP login with username "", therefore missing our previous guest connection code - this is getting a pain to do as a special case all over the shop. Tridge: We don't seem to be setting a guest bit for NTLMSSP, in either the anonymous or authenticated case, can you take a look at this? Also some cleanups in the check_password() code that should make some of the debugs clearer. Various other minor cleanups: - change the session code to just take a vuser, rather than having to do a vuid lookup on vuser.vuid - Change some of the global_client_caps linking - Better debug in authorise_login(): show the vuid. Andrew Bartlett
* server support for RAP session list functionJim McDonough2001-10-221-0/+13
|
* move to SAFE_FREE()Simo Sorce2001-09-171-2/+1
|
* got rid of USE_TDB_MMAP_FLAG as its not needed any moreAndrew Tridgell2001-09-061-1/+1
|
* Fix up some unused variables and functions, fix up formattingAndrew Bartlett2001-08-231-2/+0
|
* A few changes:Andrew Bartlett2001-08-221-29/+14
| | | | | | | | | | | | drop paramaters: status utmp hostname change session code to always record each vuid current on the server. The sessionid struct is no longer packed, as I couldn't get that to work ;-) change smbstatus to show this info and less of the connections.tdb info (its not actualy that accurate). I'll get swat doing some of this shortly.
* Added "use mmap" for HPUX.Jeremy Allison2001-07-301-1/+1
| | | | Jeremy.
* use LDSHFLAGS not -shared in several placesAndrew Tridgell2001-06-041-1/+1
|
* Based on an original PAM patch by Andrew Bartlett, re-written by me toJeremy Allison2001-04-301-12/+8
| | | | | | | remove global static PAM variables, and to tidy up the PAM internals code. Now looks like the rest of Samba. Still needs testing. Jeremy.
* Fixed memory leak in new session code.Jeremy Allison2001-04-231-0/+3
| | | | Jeremy.
* Added smb_ prefix to all Samba wrapper pam functions.Jeremy Allison2001-04-231-3/+3
| | | | | Fixed off by one bug using StrnCpy instead of strdup(). Jeremy.