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
be83aac6
Commit
be83aac6
authored
Sep 26, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable local creds on OpenBSD because it doesn't support it. Document
supported platforms in pg_hba.conf.
parent
16b9b758
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+2
-2
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+2
-2
src/backend/libpq/pg_hba.conf.sample
src/backend/libpq/pg_hba.conf.sample
+15
-12
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-auth.c
+7
-9
No files found.
src/backend/libpq/auth.c
View file @
be83aac6
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.6
7 2001/09/21 20:31:45 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.6
8 2001/09/26 19:54:12 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -520,7 +520,7 @@ ClientAuthentication(Port *port)
break
;
case
uaIdent
:
#if !defined(SO_PEERCRED) && (defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) ||
defined(HAVE_STRUCT_SOCKCRED
))
#if !defined(SO_PEERCRED) && (defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) ||
(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)
))
/*
* If we are doing ident on unix-domain sockets,
* use SCM_CREDS only if it is defined and SO_PEERCRED isn't.
...
...
src/backend/libpq/hba.c
View file @
be83aac6
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.7
2 2001/09/21 20:31:46 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.7
3 2001/09/26 19:54:12 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -904,7 +904,7 @@ ident_unix(int sock, char *ident_user)
return
true
;
#elif defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) ||
defined(HAVE_STRUCT_SOCKCRED
)
#elif defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) ||
(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)
)
struct
msghdr
msg
;
/* Credentials structure */
...
...
src/backend/libpq/pg_hba.conf.sample
View file @
be83aac6
...
...
@@ -125,18 +125,21 @@
# not store encrypted passwords if you use this option.
#
# ident: For TCP/IP connections, authentication is done by contacting
# the ident server on the client host. (CAUTION: this is only
# as secure as the client machine!) On machines that support
# SO_PEERCRED or SCM_CREDS socket requests, this method also
# works for local Unix-domain connections. AUTH_ARGUMENT is
# required: it determines how to map remote user names to
# Postgres user names. The AUTH_ARGUMENT is a map name found
# in the $PGDATA/pg_ident.conf file. The connection is accepted
# if that file contains an entry for this map name with the
# ident-supplied username and the requested Postgres username.
# The special map name "sameuser" indicates an implied map
# (not in pg_ident.conf) that maps each ident username to the
# identical PostgreSQL username.
# the ident server on the client host. (CAUTION: this is
# only as secure as the client machine!) On machines that
# support unix-domain socket credentials (currently Linux,
# FreeBSD, NetBSD, and BSD/OS), this method also works for
# "local" connections.
#
# AUTH_ARGUMENT is required: it determines how to map
# remote user names to Postgres user names. The
# AUTH_ARGUMENT is a map name found in the
# $PGDATA/pg_ident.conf file. The connection is accepted
# if that file contains an entry for this map name with
# the ident-supplied username and the requested Postgres
# username. The special map name "sameuser" indicates an
# implied map (not in pg_ident.conf) that maps each ident
# username to the identical PostgreSQL username.
#
# krb4: Kerberos V4 authentication is used. Allowed only for
# TCP/IP connections, not for local UNIX-domain sockets.
...
...
src/interfaces/libpq/fe-auth.c
View file @
be83aac6
...
...
@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.6
0 2001/09/21 20:31:49 tgl
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.6
1 2001/09/26 19:54:12 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -435,10 +435,10 @@ pg_krb5_sendauth(char *PQerrormsg, int sock,
#endif
/* KRB5 */
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || defined(HAVE_STRUCT_SOCKCRED)
static
int
pg_local_sendauth
(
char
*
PQerrormsg
,
PGconn
*
conn
)
{
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
char
buf
;
struct
iovec
iov
;
struct
msghdr
msg
;
...
...
@@ -485,8 +485,12 @@ pg_local_sendauth(char *PQerrormsg, PGconn *conn)
return
STATUS_ERROR
;
}
return
STATUS_OK
;
}
#else
snprintf
(
PQerrormsg
,
PQERRORMSG_LENGTH
,
libpq_gettext
(
"SCM_CRED authentication method not supported
\n
"
));
return
STATUS_ERROR
;
#endif
}
static
int
pg_password_sendauth
(
PGconn
*
conn
,
const
char
*
password
,
AuthRequest
areq
)
...
...
@@ -614,14 +618,8 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
break
;
case
AUTH_REQ_SCM_CREDS
:
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || defined(HAVE_STRUCT_SOCKCRED)
if
(
pg_local_sendauth
(
PQerrormsg
,
conn
)
!=
STATUS_OK
)
return
STATUS_ERROR
;
#else
snprintf
(
PQerrormsg
,
PQERRORMSG_LENGTH
,
libpq_gettext
(
"SCM_CRED authentication method not supported
\n
"
));
return
STATUS_ERROR
;
#endif
break
;
default:
...
...
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