1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

pysmbd: make sure that session unix info is filled

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14400

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jun  5 11:54:06 UTC 2020 on sn-devel-184
This commit is contained in:
Björn Baumbach 2020-06-02 15:33:36 +02:00 committed by Ralph Boehme
parent 26fd73de7b
commit 72d69eef13

View File

@ -73,6 +73,21 @@ static connection_struct *get_conn_tos(
}
}
/*
* Make sure that session unix info is filled,
* which is required by vfs operations.
*/
if (session_info->unix_info == NULL) {
PyErr_SetString(PyExc_RuntimeError,
"Session unix info not initialized");
return NULL;
}
if (session_info->unix_info->unix_name == NULL) {
PyErr_SetString(PyExc_RuntimeError,
"Session unix info not available");
return NULL;
}
status = create_conn_struct_tos(NULL,
snum,
"/",