]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Remove a call to SMBC_errno()
authorVolker Lendecke <vl@samba.org>
Sat, 23 Sep 2023 00:50:58 +0000 (17:50 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 25 Sep 2023 19:01:34 +0000 (19:01 +0000)
All returns from cacl_get() now explicitly set the errno.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/libsmb_xattr.c

index 1f82052119304b2e3081d84cbb9ffe1992367ce3..1aab4dd47dc83d0238166dd60122c6f754fcb260 100644 (file)
@@ -898,7 +898,7 @@ cacl_get(SMBCCTX *context,
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(5, ("cacl_get failed to open %s: %s\n",
                                  targetpath, nt_errstr(status)));
-                       errno = 0;
+                       errno = cli_status_to_errno(status);
                        return -1;
                }
 
@@ -907,7 +907,7 @@ cacl_get(SMBCCTX *context,
                        DEBUG(5,("cacl_get Failed to query old descriptor "
                                 "of %s: %s\n",
                                  targetpath, nt_errstr(status)));
-                       errno = 0;
+                       errno = cli_status_to_errno(status);
                        return -1;
                }
 
@@ -2176,9 +2176,6 @@ SMBC_getxattr_ctx(SMBCCTX *context,
                                filename,
                                discard_const_p(char, value),
                                size);
-                if (ret < 0 && errno == 0) {
-                        errno = SMBC_errno(context, srv->cli);
-                }
                TALLOC_FREE(frame);
                /*
                 * static function cacl_get returns a value greater than zero