cifs-utils/0003-setcifsacl-fix-comparison-of-actions-reported-by-cov.patch
volcanodragon e43741c045 sync some patches
(cherry picked from commit 25c5d27a3a8da1eaa972656018ac908f0adc4f69)
2023-06-09 10:59:45 +08:00

27 lines
851 B
Diff

From 4ad2c50f8f22968abe84a84ef49d37806731b20e Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <ab@samba.org>
Date: Wed, 16 Feb 2022 13:58:24 +0200
Subject: [PATCH] setcifsacl: fix comparison of actions reported by covscan
Signed-off-by: Alexander Bokovoy <ab@samba.org>
---
setcifsacl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setcifsacl.c b/setcifsacl.c
index 9840b14..c0ecd41 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -1497,7 +1497,7 @@ cifsacl:
numfaces = get_numfaces((struct cifs_ntsd *)attrval, attrlen,
&aclptr, ace_kind);
- if (!numfaces && (maction != ActAdd || maction != ActAddReorder)) {
+ if (!numfaces && (maction != ActAdd && maction != ActAddReorder)) {
/* if we are not adding aces */
fprintf(stderr, "%s: Empty DACL\n", __func__);
goto setcifsacl_facenum_ret;
--
2.33.0