From 73426918dfb0d34cb118573cb8cac145ad4dcb5d Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Wed, 1 Jul 1998 16:20:09 +0000 Subject: USERNET attribute can have "" around it --- src/usernetctl.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usernetctl.c b/src/usernetctl.c index 0a8011eb..5a228bdc 100644 --- a/src/usernetctl.c +++ b/src/usernetctl.c @@ -91,8 +91,17 @@ int userCtl(char * file) { *(++chptr) = '\0'; if (!strncmp(contents, "USERCTL=", 8)) { - if (!strcmp(contents+8, "yes")) return FOUND_TRUE; - else return FOUND_FALSE; + contents += 8; + if (contents[0] == '"' && + contents[strlen(contents) - 1] == '"') { + contents++; + contents[strlen(contents) - 1] = '\0'; + } + + if (!strcmp(contents, "yes") || !strcmp(contents, "true")) + return FOUND_TRUE; + else + return FOUND_FALSE; } contents = end; -- cgit v1.2.1