Esempio n. 1
0
void invalidate_vuid(uint16 vuid)
{
	user_struct *vuser = get_valid_user_struct(vuid);

	if (vuser == NULL)
		return;
	
	SAFE_FREE(vuser->homedir);
	SAFE_FREE(vuser->unix_homedir);
	SAFE_FREE(vuser->logon_script);
	
	session_yield(vuser);
	SAFE_FREE(vuser->session_keystr);

	TALLOC_FREE(vuser->server_info);

	data_blob_free(&vuser->session_key);

	DLIST_REMOVE(validated_users, vuser);

	/* clear the vuid from the 'cache' on each connection, and
	   from the vuid 'owner' of connections */
	conn_clear_vuid_cache(vuid);

	SAFE_FREE(vuser->groups);
	TALLOC_FREE(vuser->nt_user_token);
	SAFE_FREE(vuser);
	num_validated_vuids--;
}
Esempio n. 2
0
void invalidate_vuid(uint16 vuid)
{
	user_struct *vuser = NULL;

	vuser = get_valid_user_struct_internal(vuid,
			SERVER_ALLOCATED_REQUIRED_ANY);
	if (vuser == NULL) {
		return;
	}

	session_yield(vuser);

	if (vuser->auth_ntlmssp_state) {
		auth_ntlmssp_end(&vuser->auth_ntlmssp_state);
	}

	DLIST_REMOVE(validated_users, vuser);

	/* clear the vuid from the 'cache' on each connection, and
	   from the vuid 'owner' of connections */
	conn_clear_vuid_caches(vuid);

	TALLOC_FREE(vuser);
	num_validated_vuids--;
}