projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
026fafd
)
libpq: issue clear error message for nested service files
author
Bruce Momjian
<bruce@momjian.us>
Wed, 8 Apr 2015 14:26:21 +0000
(10:26 -0400)
committer
Bruce Momjian
<bruce@momjian.us>
Wed, 8 Apr 2015 14:26:58 +0000
(10:26 -0400)
Previously an odd error message was generated. Nested service files are
not supported.
Report by David Johnston
src/interfaces/libpq/fe-connect.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/libpq/fe-connect.c
b/src/interfaces/libpq/fe-connect.c
index fa8a33f40a713e3b0c2de544a5658efba126f8f5..e7c7a256e63c448410e8fece3a6318b2b9d6a39e 100644
(file)
--- a/
src/interfaces/libpq/fe-connect.c
+++ b/
src/interfaces/libpq/fe-connect.c
@@
-4061,6
+4061,16
@@
parseServiceFile(const char *serviceFile,
}
*val++ = '\0';
+ if (strcmp(key, "service") == 0)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("nested service specifications not supported in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ fclose(f);
+ return 3;
+ }
+
/*
* Set the parameter --- but don't override any previous
* explicit setting.