From c9edd32113f8883941d3c63f7a1f1748866db4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 23 Jan 2012 17:25:55 +0100 Subject: [PATCH] changed error return for user access to trusted xattr When a user queries an extended attribute in the trusted namespace, the traditional error return was EPERM. This has been recently changed to ENODATA. See https://lkml.org/lkml/2011/5/27/199 --- src/lowntfs-3g.c | 2 +- src/ntfs-3g.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index a281da6f..0e2c9479 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -2848,7 +2848,7 @@ static void ntfs_fuse_getxattr(fuse_req_t req, fuse_ino_t ino, const char *name, /* trusted only readable by root */ if ((namespace == XATTRNS_TRUSTED) && security.uid) { - res = -EPERM; + res = -ENODATA; goto out; } #endif diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 8919761d..47a17b1d 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -2791,7 +2791,7 @@ static int ntfs_fuse_getxattr(const char *path, const char *name, /* trusted only readable by root */ if ((namespace == XATTRNS_TRUSTED) && security.uid) - return -EPERM; + return -ENODATA; #endif ni = ntfs_pathname_to_inode(ctx->vol, NULL, path); if (!ni)