summaryrefslogtreecommitdiff
path: root/source3/smbd/session.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-11-08 22:19:01 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-11-08 22:19:01 +0000
commit55dfb66079333acd8e0aee91c0ee90d0a413a8e6 (patch)
treedcd7c178dbb2df6b578123bd9ee7fe78e38e979e /source3/smbd/session.c
parentf56a3ea612beded266c614511aa4c451639cbe9a (diff)
downloadsamba-55dfb66079333acd8e0aee91c0ee90d0a413a8e6.tar.gz
samba-55dfb66079333acd8e0aee91c0ee90d0a413a8e6.tar.bz2
samba-55dfb66079333acd8e0aee91c0ee90d0a413a8e6.zip
Change to guest logon code.
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 (This used to be commit 62f4e4bd0aef9ade653b3f8d575d2864c166ab4d)
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r--source3/smbd/session.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 60c2a6e54d..9efc3e6b75 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -32,9 +32,8 @@ extern fstring remote_machine;
static TDB_CONTEXT *tdb;
/* called when a session is created */
-BOOL session_claim(uint16 vuid)
+BOOL session_claim(user_struct *vuser)
{
- user_struct *vuser = get_valid_user_struct(vuid);
int i;
TDB_DATA data;
struct sessionid sessionid;
@@ -47,7 +46,7 @@ BOOL session_claim(uint16 vuid)
/* don't register sessions for the guest user - its just too
expensive to go through pam session code for browsing etc */
- if (strequal(vuser->user.unix_name,lp_guestaccount(-1))) {
+ if (vuser->guest) {
return True;
}
@@ -119,9 +118,8 @@ BOOL session_claim(uint16 vuid)
}
/* called when a session is destroyed */
-void session_yield(uint16 vuid)
+void session_yield(user_struct *vuser)
{
- user_struct *vuser = get_valid_user_struct(vuid);
TDB_DATA dbuf;
struct sessionid sessionid;
TDB_DATA key;