1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

s3: Remove procid_self() from session_claim()

This commit is contained in:
Volker Lendecke
2010-07-04 18:06:26 +02:00
parent f1d6eed962
commit 13441a9e18
4 changed files with 7 additions and 6 deletions

View File

@ -6221,7 +6221,7 @@ void close_cnum(connection_struct *conn, uint16 vuid);
/* The following definitions come from smbd/session.c */
bool session_init(void);
bool session_claim(user_struct *vuser);
bool session_claim(struct server_id pid, user_struct *vuser);
void session_yield(user_struct *vuser);
int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);

View File

@ -302,7 +302,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
"and will be vuid %u\n", (int)vuser->server_info->utok.uid,
vuser->server_info->unix_name, vuser->vuid));
if (!session_claim(vuser)) {
if (!session_claim(sconn_server_id(sconn), vuser)) {
DEBUG(1, ("register_existing_vuid: Failed to claim session "
"for vuid=%d\n",
vuser->vuid));

View File

@ -33,12 +33,11 @@
called when a session is created
********************************************************************/
bool session_claim(user_struct *vuser)
bool session_claim(struct server_id pid, user_struct *vuser)
{
TDB_DATA data;
int i = 0;
struct sessionid sessionid;
struct server_id pid = procid_self();
fstring keystr;
const char * hostname;
struct db_record *rec;

View File

@ -444,7 +444,8 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session,
register_homes_share(session->server_info->unix_name);
}
if (!session_claim(session->compat_vuser)) {
if (!session_claim(sconn_server_id(session->sconn),
session->compat_vuser)) {
DEBUG(1, ("smb2: Failed to claim session "
"for vuid=%d\n",
session->compat_vuser->vuid));
@ -662,7 +663,8 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s
register_homes_share(session->server_info->unix_name);
}
if (!session_claim(session->compat_vuser)) {
if (!session_claim(sconn_server_id(session->sconn),
session->compat_vuser)) {
DEBUG(1, ("smb2: Failed to claim session "
"for vuid=%d\n",
session->compat_vuser->vuid));