From 2d8d5ced107ab2a05d023873de4e8f12f081e5af Mon Sep 17 00:00:00 2001 From: Ricardo Martincoski Date: Mon, 6 Aug 2018 00:17:14 -0300 Subject: [PATCH] makedevs: allow leading whitespace for capabilities Currently makedevs silently ignores extended attributes with leading whitespace, for example those added to a _PERMISSIONS following the recommended style from check-package. Makedevs already ignores leading whitespace for normal entries (file permission changes and device files creation). Do the same for extended attributes. Fixes: #11191. Reported-by: Jean-pierre Cartal Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Cc: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/makedevs/makedevs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/makedevs/makedevs.c b/package/makedevs/makedevs.c index 1ba5936342..c57b964f5c 100644 --- a/package/makedevs/makedevs.c +++ b/package/makedevs/makedevs.c @@ -510,7 +510,7 @@ int main(int argc, char **argv) linenum++; - if (1 == sscanf(line, "|xattr %254s", xattr)) { + if (1 == sscanf(line, " |xattr %254s", xattr)) { #ifdef EXTENDED_ATTRIBUTES if (!full_name) bb_error_msg_and_die("line %d should be after a file\n", linenum); -- 2.30.2