Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd3d5419

Browse files
committed
Cleanup of 'sameuser' patch.
1 parent3f372ee commitd3d5419

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/backend/libpq/hba.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.31 1998/06/1304:27:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.32 1998/06/1305:14:55 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -210,8 +210,8 @@ process_hba_record(FILE *file, SockAddr *raddr, const char user[],
210210
* sort of connection, ignore it.
211211
*/
212212

213-
if ((strcmp(buf,database)!=0&&strcmp(buf,"all")!=0&&
214-
(strcmp(buf,"sameuser")!=0||strcmp(user,database)!=0))||
213+
if ((strcmp(db,database)!=0&&strcmp(db,"all")!=0&&
214+
(strcmp(db,"sameuser")!=0||strcmp(database,user)!=0))||
215215
raddr->sa.sa_family!=AF_UNIX)
216216
return;
217217
}
@@ -270,8 +270,8 @@ process_hba_record(FILE *file, SockAddr *raddr, const char user[],
270270
* sort of connection, ignore it.
271271
*/
272272

273-
if ((strcmp(buf,database)!=0&&strcmp(buf,"all")!=0&&
274-
(strcmp(buf,"sameuser")!=0||strcmp(user,database)!=0))||
273+
if ((strcmp(db,database)!=0&&strcmp(db,"all")!=0&&
274+
(strcmp(db,"sameuser")!=0||strcmp(database,user)!=0))||
275275
raddr->sa.sa_family!=AF_INET||
276276
((file_ip_addr.s_addr ^raddr->in.sin_addr.s_addr)&mask.s_addr)!=0x0000)
277277
return;

‎src/backend/libpq/pg_hba.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@
128128
# By default, allow anything over UNIX domain sockets and localhost.
129129

130130
local all trust
131-
host all 127.0.0.1 255.255.255.255 trust
131+
host all 127.0.0.1 255.255.255.255 trust

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp