aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initscripts.spec5
-rw-r--r--src/usernetctl.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 75c256ae..2285cd07 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -153,6 +153,11 @@ rm -rf $RPM_BUILD_ROOT
%doc sysconfig.txt
%changelog
+
+* Wed Jul 01 1998 Erik Troan <ewt@redhat.com>
+
+- usernetctl didn't understand "" around USERCTL attribute
+
* Wed Jul 1 1998 Jeff Johnson <jbj@redhat.com>
- Use /proc/version to find preferred modules.
- Numerous buglets fixed.
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;