diff options
author | Ralph Boehme <slow@samba.org> | 2021-02-16 14:19:51 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2021-02-22 10:53:26 +0000 |
commit | 5b1a5b776a7bed76695599211397469666fb2142 (patch) | |
tree | d578591910f858498c0c6ae8158b8616ec88407d | |
parent | d339556659c9eacd5a97ff40f1f24e3cb3aeccb4 (diff) | |
download | samba-5b1a5b776a7bed76695599211397469666fb2142.tar.gz |
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 <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 8c1fd86db873f0326faf1cefa731a03709f8ac7f)
-rw-r--r-- | source3/printing/nt_printing.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index ffee1d51e5f..c61af088981 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( |