diff options
author | Tomas Mraz <tmraz@redhat.com> | 2015-04-08 10:45:53 +0200 |
---|---|---|
committer | Tomas Mraz <tmraz@redhat.com> | 2015-04-08 10:45:53 +0200 |
commit | 3a1d0a80b71ac9e8babef7d992db3c8509d32889 (patch) | |
tree | ddd234b33af40631f38d8b499e6b7590c280eeb1 | |
parent | 760047c902ff656f1f6619c5eebf3f65a984d9c2 (diff) | |
download | libpwquality-3a1d0a80b71ac9e8babef7d992db3c8509d32889.tar.gz |
Allow no space around '=' in config file.
-rw-r--r-- | src/settings.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/settings.c b/src/settings.c index 1f73395..6c242e8 100644 --- a/src/settings.c +++ b/src/settings.c @@ -150,9 +150,11 @@ pwquality_read_config(pwquality_settings_t *pwq, const char *cfgfile, void **aux if (*ptr == '\0') continue; + eq = 0; name = ptr; while (*ptr != '\0') { - if (isspace(*ptr)) { + if (isspace(*ptr) || *ptr == '=') { + eq = *ptr == '='; *ptr = '\0'; ++ptr; break; @@ -160,7 +162,6 @@ pwquality_read_config(pwquality_settings_t *pwq, const char *cfgfile, void **aux ++ptr; } - eq = 0; while (*ptr != '\0') { if (*ptr != '=' || eq) { if (!isspace(*ptr)) { |