[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Acl-devel] [PATCH attr 5/8] examples: Check "user." as a prefix not as
From: |
Guillem Jover |
Subject: |
[Acl-devel] [PATCH attr 5/8] examples: Check "user." as a prefix not as the entire string |
Date: |
Sat, 20 Jul 2019 04:14:39 +0200 |
The code was not matching any intended attribute as it was checking for
the entire string.
Signed-off-by: Guillem Jover <address@hidden>
---
examples/copyattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/copyattr.c b/examples/copyattr.c
index f8acb73..5ffe564 100644
--- a/examples/copyattr.c
+++ b/examples/copyattr.c
@@ -88,7 +88,7 @@ struct error_context ctx = { error, quote, quote_free };
*/
static int is_user_attr(const char *name, struct error_context *ctx)
{
- return strcmp(name, "user.") == 0;
+ return strncmp(name, "user.", 5) == 0;
}
int
--
2.22.0.657.g960e92d24f
- [Acl-devel] [PATCH attr 0/8] Assorted fixes, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 5/8] examples: Check "user." as a prefix not as the entire string,
Guillem Jover <=
- [Acl-devel] [PATCH attr 6/8] man: Fix various typos, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 8/8] po: Update Dutch translation, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 4/8] Ignore examples/copyattr, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 1/8] build: Fix for incompatibility with autoconf 2.13, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 7/8] build: Only include the compat syscall stubs on Linux systems, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 2/8] build: Do not assume we have a config.h header around, Guillem Jover, 2019/07/20
- [Acl-devel] [PATCH attr 3/8] build: Use LDLIBS instead of LDFLAGS, Guillem Jover, 2019/07/20