aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/extattr.h
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2017-01-18 18:16:57 +0000
committerConrad Meyer <cem@FreeBSD.org>2017-01-18 18:16:57 +0000
commitc9bf8148044f38aa1b093a96c88a309afb86592c (patch)
treef2df9dfed56c94a53d9e96d2c7d789ddfeb96cae /sys/sys/extattr.h
parent4a42ab7ddab29949f4c54bea34241997ffdf6a8d (diff)
downloadsrc-c9bf8148044f38aa1b093a96c88a309afb86592c.tar.gz
src-c9bf8148044f38aa1b093a96c88a309afb86592c.zip
restore(8): Handle extended attribute names correctly
UFS2 extended attribute names are not NUL-terminated. Handle appropriately. Correct the EXTATTR_BASE_LENGTH() macro, which handled ea_namelength == one (mod eight) extended attributes incorrectly. PR: 216127 Reported by: dewayne at heuristicsystems.com.au Reviewed by: kib@ Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9208
Notes
Notes: svn path=/head/; revision=312393
Diffstat (limited to 'sys/sys/extattr.h')
-rw-r--r--sys/sys/extattr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h
index ce5619bef162..2b358c92d740 100644
--- a/sys/sys/extattr.h
+++ b/sys/sys/extattr.h
@@ -57,10 +57,11 @@
EXTATTR_NAMESPACE_USER_STRING, \
EXTATTR_NAMESPACE_SYSTEM_STRING }
+#define EXTATTR_MAXNAMELEN NAME_MAX
+
#ifdef _KERNEL
#include <sys/types.h>
-#define EXTATTR_MAXNAMELEN NAME_MAX
struct thread;
struct ucred;
struct vnode;