From a0e8a279802aa9f26a3ccf3f8ee27110a1509d19 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 7 Aug 2009 00:21:39 +0200 Subject: desktop-file: relax validity checks a bit Mnimally change the validity checks for deskto files so that the ConsoleKit database can pass as valid. --- dbus/dbus-desktop-file.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dbus/dbus-desktop-file.c b/dbus/dbus-desktop-file.c index 45932398..30ca8438 100644 --- a/dbus/dbus-desktop-file.c +++ b/dbus/dbus-desktop-file.c @@ -71,7 +71,7 @@ static unsigned char valid[256] = { 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x3 , 0x2 , 0x0 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , - 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x0 , 0x0 , 0x0 , 0x0 , 0x2 , + 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x0 , 0x0 , 0x0 , 0x0 , 0x3 , 0x0 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x3 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , 0x0 , @@ -379,8 +379,10 @@ is_valid_section_name (const char *name) while (*name) { - if (!((*name >= 'A' && *name <= 'Z') || (*name >= 'a' || *name <= 'z') || - *name == '\n' || *name == '\t')) + if (!((*name >= 'A' && *name <= 'Z') || + (*name >= 'a' || *name <= 'z') || + (*name >= '0' || *name <= '9') || + *name == '\n' || *name == '\t' || *name == ' ' || *name == '/')) return FALSE; name++; -- cgit