s3: smbd: Clarify POSIX name handling in SMB2 get/setinfo calls.
authorJeremy Allison <jra@samba.org>
Mon, 18 Mar 2019 21:52:26 +0000 (14:52 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 19 Mar 2019 22:55:11 +0000 (22:55 +0000)
We should never be looking at the info level here, the create
call will have set the correct POSIX flag on the smb_filename
struct.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 19 22:55:11 UTC 2019 on sn-devel-144

source3/smbd/smb2_getinfo.c
source3/smbd/smb2_setinfo.c

index 29625fc1ba70cbfcd0f5edd7c202c2e9f69c2a74..cd92db18619d85c8f247a6e45a397d222486c293 100644 (file)
@@ -332,7 +332,7 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
                         * to do this call. JRA.
                         */
 
-                       if (INFO_LEVEL_IS_UNIX(file_info_level)) {
+                       if (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH) {
                                /* Always do lstat for UNIX calls. */
                                if (SMB_VFS_LSTAT(conn, fsp->fsp_name)) {
                                        DEBUG(3,("smbd_smb2_getinfo_send: "
index b19cbb150a7f64bc2c2333d3e7339339cfe71e08..92e06f8c7d2abf47b98ee62daf9d7818becc67a0 100644 (file)
@@ -409,7 +409,7 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx,
                         * handle (returned from an NT SMB). NT5.0 seems
                         * to do this call. JRA.
                         */
-                       if (INFO_LEVEL_IS_UNIX(file_info_level)) {
+                       if (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH) {
                                /* Always do lstat for UNIX calls. */
                                if (SMB_VFS_LSTAT(conn, fsp->fsp_name)) {
                                        DEBUG(3,("smbd_smb2_setinfo_send: "