aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usernetctl.c13
1 files changed, 11 insertions, 2 deletions
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;