aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-07-01 16:20:09 +0000
committerErik Troan <ewt@redhat.com>1998-07-01 16:20:09 +0000
commit73426918dfb0d34cb118573cb8cac145ad4dcb5d (patch)
treeecadbdcff4bf4f5c4663bac41d9ab0b0f81ba076 /src
parent558419e785d0e766357d46f9712dbef443b3e773 (diff)
downloadinitscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar.gz
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar.bz2
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar.xz
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.zip
USERNET attribute can have "" around it
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;