The branch, master has been updated via 718f7b1a84f printing: use correct error out in get_correct_cversion() when openat_pathref_fsp() fails via 70063c523bf printing: use correct error out in file_version_is_newer() when openat_pathref_fsp() fails via 8c1fd86db87 printing: use correct error out in file_version_is_newer() when openat_pathref_fsp() fails from 09a8f409e59 samba-tool: Replace gpo command for removing Sudoers Group Policy
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 718f7b1a84f1c6eb35d52232a8573370f45add56 Author: Ralph Boehme <s...@samba.org> Date: Tue Feb 16 14:24:05 2021 +0100 printing: use correct error out in get_correct_cversion() when openat_pathref_fsp() fails Fixes a regression introduced by a74f0af1a91fe0bbc68e4d41d65f43ec383ae8bf: if there's no existing file, openat_pathref_fsp() will fail with NT_STATUS_OBJECT_NAME_NOT_FOUND which must be handled the same way it is done by the SMB_VFS_CREATE_FILE() call below. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14635 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Guenther Deschner <g...@samba.org> Autobuild-User(master): Günther Deschner <g...@samba.org> Autobuild-Date(master): Wed Feb 17 19:53:00 UTC 2021 on sn-devel-184 commit 70063c523bff5e471eac2b011b243c5aa0c4bee1 Author: Ralph Boehme <s...@samba.org> Date: Tue Feb 16 14:23:02 2021 +0100 printing: use correct error out in file_version_is_newer() when openat_pathref_fsp() fails Fixes a regression introduced by ef5e913bca584f0232d5bfff14df4ccba2dda35c: if there's no existing file, openat_pathref_fsp() will fail with NT_STATUS_OBJECT_NAME_NOT_FOUND which must be handled the same way it is done by the SMB_VFS_CREATE_FILE() call below. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14635 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Guenther Deschner <g...@samba.org> commit 8c1fd86db873f0326faf1cefa731a03709f8ac7f Author: Ralph Boehme <s...@samba.org> Date: Tue Feb 16 14:19:51 2021 +0100 printing: use correct error out in file_version_is_newer() when openat_pathref_fsp() fails Fixes a regression introduced by cbe25e1777d0c43c21e8acc2cea79fd03fdaf2ea: if there's no existing file, openat_pathref_fsp() will fail with NT_STATUS_OBJECT_NAME_NOT_FOUND which must be handled the same way it is done by the SMB_VFS_CREATE_FILE() call below. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14635 Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Guenther Deschner <g...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/printing/nt_printing.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 9b7904f6778..e9253093ae2 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -833,7 +833,8 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr status = openat_pathref_fsp(conn->cwd_fsp, smb_fname); if (!NT_STATUS_IS_OK(status)) { - return false; + ret = 1; + goto done; } status = SMB_VFS_CREATE_FILE( @@ -892,7 +893,9 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr status = openat_pathref_fsp(conn->cwd_fsp, smb_fname); if (!NT_STATUS_IS_OK(status)) { - return false; + DBG_NOTICE("Can't open new file [%s], errno = %d\n", + smb_fname_str_dbg(smb_fname), errno); + goto error_exit; } status = SMB_VFS_CREATE_FILE( @@ -1101,7 +1104,10 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf nt_status = openat_pathref_fsp(conn->cwd_fsp, smb_fname); if (!NT_STATUS_IS_OK(nt_status)) { - return false; + DBG_NOTICE("Can't open file [%s], errno =%d\n", + smb_fname_str_dbg(smb_fname), errno); + *perr = WERR_ACCESS_DENIED; + goto error_exit; } nt_status = SMB_VFS_CREATE_FILE( -- Samba Shared Repository