8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.53 2001/06/20 18:07:55 petere Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.54 2001/07/21 00:29:56 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -122,7 +122,6 @@ pg_krb4_recvauth(Port *port)
122
122
123
123
return STATUS_ERROR ;
124
124
}
125
-
126
125
#endif /* KRB4 */
127
126
128
127
@@ -304,7 +303,6 @@ pg_krb5_recvauth(Port *port)
304
303
305
304
return STATUS_ERROR ;
306
305
}
307
-
308
306
#endif /* KRB5 */
309
307
310
308
@@ -399,7 +397,6 @@ recv_and_check_passwordv0(Port *port)
399
397
* Note that many sorts of failure report additional information in the
400
398
* postmaster log, which we hope is only readable by good guys.
401
399
*/
402
-
403
400
static void
404
401
auth_failed (Port * port )
405
402
{
@@ -435,7 +432,6 @@ auth_failed(Port *port)
435
432
}
436
433
437
434
438
-
439
435
/*
440
436
* Client authentication starts here. If there is an error, this
441
437
* function does not return and the backend process is terminated.
@@ -451,7 +447,6 @@ ClientAuthentication(Port *port)
451
447
* hba config file, not with the request. hba.c should have dropped
452
448
* an error message into the postmaster logfile if it failed.
453
449
*/
454
-
455
450
if (hba_getauthmethod (port ) != STATUS_OK )
456
451
elog (FATAL , "Missing or erroneous pg_hba.conf file, see postmaster log for details" );
457
452
@@ -464,26 +459,24 @@ ClientAuthentication(Port *port)
464
459
}
465
460
466
461
/* Handle new style authentication. */
467
-
468
462
switch (port -> auth_method )
469
463
{
470
464
case uaReject :
471
-
472
- /*
473
- * This could have come from an explicit "reject" entry in
474
- * pg_hba.conf, but more likely it means there was no
475
- * matching entry. Take pity on the poor user and issue a
476
- * helpful error message. NOTE: this is not a security
477
- * breach, because all the info reported here is known at
478
- * the frontend and must be assumed known to bad guys.
479
- * We're merely helping out the less clueful good guys.
480
- */
465
+ /*
466
+ * This could have come from an explicit "reject" entry in
467
+ * pg_hba.conf, but more likely it means there was no
468
+ * matching entry. Take pity on the poor user and issue a
469
+ * helpful error message. NOTE: this is not a security
470
+ * breach, because all the info reported here is known at
471
+ * the frontend and must be assumed known to bad guys.
472
+ * We're merely helping out the less clueful good guys.
473
+ */
481
474
{
482
475
const char * hostinfo = "localhost" ;
483
476
484
477
if (port -> raddr .sa .sa_family == AF_INET )
485
478
hostinfo = inet_ntoa (port -> raddr .in .sin_addr );
486
- elog (FATAL ,
479
+ elog (FATAL ,
487
480
"No pg_hba.conf entry for host %s, user %s, database %s" ,
488
481
hostinfo , port -> user , port -> database );
489
482
return ;
@@ -530,7 +523,6 @@ ClientAuthentication(Port *port)
530
523
/*
531
524
* Send an authentication request packet to the frontend.
532
525
*/
533
-
534
526
static void
535
527
sendAuthRequest (Port * port , AuthRequest areq )
536
528
{
@@ -556,7 +548,6 @@ sendAuthRequest(Port *port, AuthRequest areq)
556
548
/*
557
549
* Called when we have received the password packet.
558
550
*/
559
-
560
551
static int
561
552
recv_and_check_password_packet (Port * port )
562
553
{
@@ -638,7 +629,6 @@ old_be_recvauth(Port *port)
638
629
* allow the connection anyway, disallow it anyway, or use the result)
639
630
* depending on what authentication we really want to use.
640
631
*/
641
-
642
632
static int
643
633
map_old_to_new (Port * port , UserAuth old , int status )
644
634
{
0 commit comments