Noticed by Andrew Walker <awalker@ixsystems.com>. set_sec_ctx(del_token->uid, del_token->gid, del_token->ngroups, del_token->groups, del_nt_token); if (!del_share_mode(lck, fsp)) { DEBUG(0, ("close_directory: Could not delete share entry for " "%s\n", fsp_str_dbg(fsp))); } TALLOC_FREE(lck); if ((fsp->conn->fs_capabilities & FILE_NAMED_STREAMS) && !is_ntfs_stream_smb_fname(fsp->fsp_name)) { status = delete_all_streams(fsp->conn, fsp->fsp_name); if (!NT_STATUS_IS_OK(status)) { DEBUG(5, ("delete_all_streams failed: %s\n", nt_errstr(status))); file_free(req, fsp); return status; } } Shouldn't we be pop_sec_ctx() before returning status here? Am I misunderstanding something?
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2329 Passes ci.
This bug was referenced in samba master: 5f9dbf3decd17129f360cbe14383cc79e20fb70b
Created attachment 17086 [details] git-am fix for 4.15.next and 4.14.next. Cherry-picked from master.
Re-assigning to Jule for inclusion in 4.15.next, 4.14.next.
Pushed to autobuild-v4-{15,14}-test.
This bug was referenced in samba v4-14-test: 4a6813f7bc93fcaf802f6733e24679adb7cfc52c
This bug was referenced in samba v4-15-test: 5a2227d704c9385bc51489e570e744ab750d9aa9
Closing out bug report. Thanks!
This bug was referenced in samba v4-15-stable (Release samba-4.15.4): 5a2227d704c9385bc51489e570e744ab750d9aa9
This bug was referenced in samba v4-14-stable (Release samba-4.14.13): 4a6813f7bc93fcaf802f6733e24679adb7cfc52c