diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-25 14:58:24 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-31 00:32:07 +0200 |
commit | ade01f083c502ecf7cba19303eb16d3c9a4be52a (patch) | |
tree | 8fe090925a70c9ed4f5de4efa344ea4a79a80216 /source3/smbd/uid.c | |
parent | 4e374d167992195b7a0e0f8c82aab755fd3d8379 (diff) | |
download | samba-ade01f083c502ecf7cba19303eb16d3c9a4be52a.tar.gz samba-ade01f083c502ecf7cba19303eb16d3c9a4be52a.tar.bz2 samba-ade01f083c502ecf7cba19303eb16d3c9a4be52a.zip |
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
Diffstat (limited to 'source3/smbd/uid.c')
-rw-r--r-- | source3/smbd/uid.c | 44 |
1 files changed, 0 insertions, 44 deletions
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 @@ -182,50 +182,6 @@ static bool check_user_ok(connection_struct *conn, } /**************************************************************************** - 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; i<VUID_CACHE_SIZE; i++) { - struct vuid_cache_entry *ent; - - ent = &conn->vuid_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. ****************************************************************************/ |