All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [2018.02.x 1/2] makedevs: allow leading whitespace for capabilities
@ 2018-08-06  3:17 Ricardo Martincoski
  2018-08-06  3:17 ` [Buildroot] [2018.02.x 2/2] support/testing: add test for file capabilities Ricardo Martincoski
  2018-08-09 21:42 ` [Buildroot] [2018.02.x 1/2] makedevs: allow leading whitespace for capabilities Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Ricardo Martincoski @ 2018-08-06  3:17 UTC (permalink / raw)
  To: buildroot

Currently makedevs silently ignores extended attributes with leading
whitespace, for example those added to a <PACKAGE>_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 <jpcartal@free.fr>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 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.17.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-10  6:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06  3:17 [Buildroot] [2018.02.x 1/2] makedevs: allow leading whitespace for capabilities Ricardo Martincoski
2018-08-06  3:17 ` [Buildroot] [2018.02.x 2/2] support/testing: add test for file capabilities Ricardo Martincoski
2018-08-10  2:21   ` Ricardo Martincoski
2018-08-10  6:32   ` Peter Korsgaard
2018-08-09 21:42 ` [Buildroot] [2018.02.x 1/2] makedevs: allow leading whitespace for capabilities Thomas Petazzoni
2018-08-10  2:18   ` Ricardo Martincoski
2018-08-10  6:29     ` Peter Korsgaard
2018-08-10  6:28   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.