From 07f156d8436ac5ecbfd99e88231625351b54e16e Mon Sep 17 00:00:00 2001 From: Shachar Sharon Date: Tue, 30 Jul 2024 09:55:44 +0300 Subject: [PATCH] vfs_ceph{_new}: do not set errno upon successful call to libcephfs There is code in Samba that expects errno from a previous system call to be preserved through a subsequent system call. Thus, avoid setting "errno = 0" in status_code() and lstatus_code() upon successful return from libcephfs API call. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15686 Signed-off-by: Shachar Sharon Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S (cherry picked from commit a7f4e2bd47c7f4728f3ac8d90af693156a69c557) --- source3/modules/vfs_ceph_new.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 99d4a1fe407..c11f5f24616 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -66,7 +66,6 @@ static int status_code(int ret) errno = -ret; return -1; } - errno = 0; return ret; } @@ -76,7 +75,6 @@ static ssize_t lstatus_code(intmax_t ret) errno = -((int)ret); return -1; } - errno = 0; return (ssize_t)ret; }