Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6bd17609
Commit
6bd17609
authored
Oct 02, 2012
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve some LDAP authentication error messages
parent
ce754579
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+12
-7
No files found.
src/backend/libpq/auth.c
View file @
6bd17609
...
...
@@ -2161,6 +2161,7 @@ CheckLDAPAuth(Port *port)
char
*
attributes
[
2
];
char
*
dn
;
char
*
c
;
int
count
;
/*
* Disallow any characters that we would otherwise need to escape,
...
...
@@ -2223,17 +2224,21 @@ CheckLDAPAuth(Port *port)
return
STATUS_ERROR
;
}
if
(
ldap_count_entries
(
ldap
,
search_message
)
!=
1
)
count
=
ldap_count_entries
(
ldap
,
search_message
);
if
(
count
!=
1
)
{
if
(
ldap_count_entries
(
ldap
,
search_message
)
==
0
)
if
(
count
==
0
)
ereport
(
LOG
,
(
errmsg
(
"LDAP search failed for filter
\"
%s
\"
on server
\"
%s
\"
: no such user"
,
(
errmsg
(
"LDAP user
\"
%s
\"
does not exist"
,
port
->
user_name
),
errdetail
(
"LDAP search for filter
\"
%s
\"
on server
\"
%s
\"
returned no entries."
,
filter
,
port
->
hba
->
ldapserver
)));
else
ereport
(
LOG
,
(
errmsg
(
"LDAP search failed for filter
\"
%s
\"
on server
\"
%s
\"
: user is not unique (%ld matches)"
,
filter
,
port
->
hba
->
ldapserver
,
(
long
)
ldap_count_entries
(
ldap
,
search_message
))));
(
errmsg
(
"LDAP user
\"
%s
\"
is not unique"
,
port
->
user_name
),
errdetail_plural
(
"LDAP search for filter
\"
%s
\"
on server
\"
%s
\"
returned %d entry."
,
"LDAP search for filter
\"
%s
\"
on server
\"
%s
\"
returned %d entries."
,
count
,
filter
,
port
->
hba
->
ldapserver
,
count
)));
pfree
(
filter
);
ldap_msgfree
(
search_message
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment