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
f988edb4
Commit
f988edb4
authored
Dec 03, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OpenBSD local indent credentials, from William Ahern.
parent
31504cc8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
7 deletions
+36
-7
configure
configure
+2
-1
configure.in
configure.in
+2
-2
doc/src/sgml/client-auth.sgml
doc/src/sgml/client-auth.sgml
+3
-2
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+29
-2
No files found.
configure
View file @
f988edb4
...
@@ -9819,7 +9819,8 @@ test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
...
@@ -9819,7 +9819,8 @@ test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
for
ac_func
in
cbrt fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
for
ac_func
in
cbrt fcvt getopt_long getpeereid memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
do
do
as_ac_var
=
`
echo
"ac_cv_func_
$ac_func
"
|
$as_tr_sh
`
as_ac_var
=
`
echo
"ac_cv_func_
$ac_func
"
|
$as_tr_sh
`
echo
"
$as_me
:
$LINENO
: checking for
$ac_func
"
>
&5
echo
"
$as_me
:
$LINENO
: checking for
$ac_func
"
>
&5
...
...
configure.in
View file @
f988edb4
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.21
8 2002/11/04 21:36:13 tgl
Exp $
dnl $Header: /cvsroot/pgsql/configure.in,v 1.21
9 2002/12/03 21:50:43 momjian
Exp $
dnl
dnl
dnl Developers, please strive to achieve this order:
dnl Developers, please strive to achieve this order:
dnl
dnl
...
@@ -782,7 +782,7 @@ PGAC_FUNC_GETTIMEOFDAY_1ARG
...
@@ -782,7 +782,7 @@ PGAC_FUNC_GETTIMEOFDAY_1ARG
# SunOS doesn't handle negative byte comparisons properly with +/- return
# SunOS doesn't handle negative byte comparisons properly with +/- return
AC_FUNC_MEMCMP
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([cbrt fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync])
AC_CHECK_FUNCS([cbrt fcvt getopt_long
getpeereid
memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync])
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
...
...
doc/src/sgml/client-auth.sgml
View file @
f988edb4
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.4
1 2002/11/15 03:11:15
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.4
2 2002/12/03 21:50:44
momjian Exp $
-->
-->
<chapter id="client-authentication">
<chapter id="client-authentication">
...
@@ -318,7 +318,8 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <
...
@@ -318,7 +318,8 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <
support Unix-domain socket credentials (currently
support Unix-domain socket credentials (currently
<systemitem class=osname>Linux</>, <systemitem
<systemitem class=osname>Linux</>, <systemitem
class=osname>FreeBSD</>, <systemitem class=osname>NetBSD</>,
class=osname>FreeBSD</>, <systemitem class=osname>NetBSD</>,
and <systemitem class=osname>BSD/OS</>).
<systemitem class=osname>OpenBSD</>, and
<systemitem class=osname>BSD/OS</>).
</para>
</para>
<para>
<para>
...
...
src/backend/libpq/hba.c
View file @
f988edb4
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.8
7 2002/09/04 20:31:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.8
8 2002/12/03 21:50:44
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1216,7 +1216,34 @@ ident_inet(const struct in_addr remote_ip_addr,
...
@@ -1216,7 +1216,34 @@ ident_inet(const struct in_addr remote_ip_addr,
static
bool
static
bool
ident_unix
(
int
sock
,
char
*
ident_user
)
ident_unix
(
int
sock
,
char
*
ident_user
)
{
{
#if defined(SO_PEERCRED)
#if defined(HAVE_GETPEEREID)
/* OpenBSD style: */
uid_t
uid
;
gid_t
gid
;
struct
passwd
*
pass
;
errno
=
0
;
if
(
getpeereid
(
sock
,
&
uid
,
&
gid
)
!=
0
)
{
/* We didn't get a valid credentials struct. */
elog
(
LOG
,
"ident_unix: error receiving credentials: %m"
);
return
false
;
}
pass
=
getpwuid
(
uid
);
if
(
pass
==
NULL
)
{
elog
(
LOG
,
"ident_unix: unknown local user with uid %d"
,
(
int
)
uid
);
return
false
;
}
StrNCpy
(
ident_user
,
pass
->
pw_name
,
IDENT_USERNAME_MAX
+
1
);
return
true
;
#elsif defined(SO_PEERCRED)
/* Linux style: use getsockopt(SO_PEERCRED) */
/* Linux style: use getsockopt(SO_PEERCRED) */
struct
ucred
peercred
;
struct
ucred
peercred
;
ACCEPT_TYPE_ARG3
so_len
=
sizeof
(
peercred
);
ACCEPT_TYPE_ARG3
so_len
=
sizeof
(
peercred
);
...
...
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