diff options
author | Björn Baumbach <bb@sernet.de> | 2020-06-02 15:33:36 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2020-06-05 11:54:06 +0000 |
commit | 72d69eef136d135788942cbdef3775ddd74e241f (patch) | |
tree | b5b7a141d7a6ecca102d576627c3b4fac098e83d /source3 | |
parent | 26fd73de7b25dfc191e5c164d3c375bae2b4c113 (diff) | |
download | samba-72d69eef136d135788942cbdef3775ddd74e241f.tar.gz |
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
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/pysmbd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index 7f671cf6eeb..dd4a70ca256 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -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, "/", |