lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1454577423-16073-1-git-send-email-treeze.taeung@gmail.com>
Date:	Thu,  4 Feb 2016 18:17:03 +0900
From:	Taeung Song <treeze.taeung@...il.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Taeung Song <treeze.taeung@...il.com>,
	Jiri Olsa <jolsa@...hat.com>
Subject: [PATCH v2] perf tools: bug fix, an error of parsing 'man.<tool>.*' config variable.

To add new man viewer, configs like 'man.<tool>.cmd',
'man.<tool>.path' can be set into config file (~/.perfconfig).
But parsing config file is stopped because the config variable
contains '.' character i.e.

If setting 'man.xman.cmd' into config file,

[man]
        gman.cmd = gman

when launching perf an error message is printed like below.

Fatal: bad config file line 11 in /home/taeung/.perfconfig

So modify iskeychar() function to decide '.' character
as key character parsing config file.

Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Signed-off-by: Taeung Song <treeze.taeung@...il.com>
---
 tools/perf/util/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index d3e12e3..3c01ced 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -122,7 +122,7 @@ static char *parse_value(void)
 
 static inline int iskeychar(int c)
 {
-	return isalnum(c) || c == '-' || c == '_';
+	return isalnum(c) || c == '-' || c == '_' || c == '.';
 }
 
 static int get_value(config_fn_t fn, void *data, char *name, unsigned int len)
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ