From ade01f083c502ecf7cba19303eb16d3c9a4be52a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 25 May 2011 14:58:24 +1000 Subject: s3-smbd Split conn.c into 3 files The idea with this split is to make it easier to handle dependencies, avoiding having the loadparm code depend on the global server variables, without resorting to dummy functions and linker tricks. conn_clear_vuid_cache() is brought in from uid.c to make it static Andrew Bartlett --- source3/smbd/uid.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'source3/smbd/uid.c') diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 7b04713bab..fb05a6ce98 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -181,50 +181,6 @@ static bool check_user_ok(connection_struct *conn, return(True); } -/**************************************************************************** - Clear a vuid out of the connection's vuid cache - This is only called on SMBulogoff. -****************************************************************************/ - -void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid) -{ - int i; - - for (i=0; ivuid_cache.array[i]; - - if (ent->vuid == vuid) { - ent->vuid = UID_FIELD_INVALID; - /* - * We need to keep conn->session_info around - * if it's equal to ent->session_info as a SMBulogoff - * is often followed by a SMBtdis (with an invalid - * vuid). The debug code (or regular code in - * vfs_full_audit) wants to refer to the - * conn->session_info pointer to print debug - * statements. Theoretically this is a bug, - * as once the vuid is gone the session_info - * on the conn struct isn't valid any more, - * but there's enough code that assumes - * conn->session_info is never null that - * it's easier to hold onto the old pointer - * until we get a new sessionsetupX. - * As everything is hung off the - * conn pointer as a talloc context we're not - * leaking memory here. See bug #6315. JRA. - */ - if (conn->session_info == ent->session_info) { - ent->session_info = NULL; - } else { - TALLOC_FREE(ent->session_info); - } - ent->read_only = False; - } - } -} - /**************************************************************************** Become the user of a connection number without changing the security context stack, but modify the current_user entries. -- cgit