@@ -381,7 +381,7 @@ sub test_query
381381 ' test1' ,
382382 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
383383 0,
384- ' gssencmode=prefer gssdelegation=enable ' ,
384+ ' gssencmode=prefer gssdelegation=1 ' ,
385385 ' succeeds with GSS-encrypted access preferred with host hba and credentials not delegated even though asked for (ticket not forwardable)' ,
386386 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
387387 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -391,7 +391,7 @@ sub test_query
391391 ' test1' ,
392392 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
393393 0,
394- ' gssencmode=require gssdelegation=enable ' ,
394+ ' gssencmode=require gssdelegation=1 ' ,
395395 ' succeeds with GSS-encrypted access required with host hba and credentials not delegated even though asked for (ticket not forwardable)' ,
396396 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
397397 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -480,7 +480,7 @@ sub test_query
480480 ' test1' ,
481481 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
482482 0,
483- ' gssencmode=prefer gssdelegation=enable ' ,
483+ ' gssencmode=prefer gssdelegation=1 ' ,
484484 ' succeeds with GSS-encrypted access preferred and hostgssenc hba and credentials not forwarded (server does not accept them, default)' ,
485485 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
486486 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -490,7 +490,7 @@ sub test_query
490490 ' test1' ,
491491 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
492492 0,
493- ' gssencmode=require gssdelegation=enable ' ,
493+ ' gssencmode=require gssdelegation=1 ' ,
494494 ' succeeds with GSS-encrypted access required and hostgssenc hba and credentials not forwarded (server does not accept them, default)' ,
495495 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
496496 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -504,7 +504,7 @@ sub test_query
504504 ' test1' ,
505505 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
506506 0,
507- ' gssencmode=prefer gssdelegation=enable ' ,
507+ ' gssencmode=prefer gssdelegation=1 ' ,
508508 ' succeeds with GSS-encrypted access preferred and hostgssenc hba and credentials not forwarded (server does not accept them, explicitly disabled)' ,
509509 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
510510 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -514,7 +514,7 @@ sub test_query
514514 ' test1' ,
515515 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
516516 0,
517- ' gssencmode=require gssdelegation=enable ' ,
517+ ' gssencmode=require gssdelegation=1 ' ,
518518 ' succeeds with GSS-encrypted access required and hostgssenc hba and credentials not forwarded (server does not accept them, explicitly disabled)' ,
519519 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
520520 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -528,7 +528,7 @@ sub test_query
528528 ' test1' ,
529529 ' SELECT gss_authenticated AND encrypted AND credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
530530 0,
531- ' gssencmode=prefer gssdelegation=enable ' ,
531+ ' gssencmode=prefer gssdelegation=1 ' ,
532532 ' succeeds with GSS-encrypted access preferred and hostgssenc hba and credentials forwarded' ,
533533 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
534534 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -538,7 +538,7 @@ sub test_query
538538 ' test1' ,
539539 ' SELECT gss_authenticated AND encrypted AND credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
540540 0,
541- ' gssencmode=require gssdelegation=enable ' ,
541+ ' gssencmode=require gssdelegation=1 ' ,
542542 ' succeeds with GSS-encrypted access required and hostgssenc hba and credentials forwarded' ,
543543 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
544544 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -558,7 +558,7 @@ sub test_query
558558 ' test1' ,
559559 ' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
560560 0,
561- ' gssencmode=require gssdelegation=disable ' ,
561+ ' gssencmode=require gssdelegation=0 ' ,
562562 ' succeeds with GSS-encrypted access required and hostgssenc hba and credentials explicitly not forwarded' ,
563563 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
564564 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -572,7 +572,7 @@ sub test_query
572572 ' postgres' ,
573573 " SELECT * FROM dblink('user=test1 dbname=$dbname host=$host hostaddr=$hostaddr port=$port ','select 1') as t1(c1 int);" ,
574574 connstr =>
575- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
575+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
576576 stdout => \$psql_out ,
577577 stderr => \$psql_stderr );
578578is($psql_rc , ' 3' , ' dblink attempt fails without delegated credentials' );
@@ -589,7 +589,7 @@ sub test_query
589589 ' postgres' ,
590590 " SELECT * FROM dblink('user=test2 dbname=$dbname port=$port passfile=$pgpass ','select 1') as t1(c1 int);" ,
591591 connstr =>
592- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
592+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
593593 stdout => \$psql_out ,
594594 stderr => \$psql_stderr );
595595is($psql_rc , ' 3' ,
@@ -608,7 +608,7 @@ sub test_query
608608 ' postgres' ,
609609 " TABLE tf1;" ,
610610 connstr =>
611- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
611+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
612612 stdout => \$psql_out ,
613613 stderr => \$psql_stderr );
614614is($psql_rc , ' 3' , ' postgres_fdw does not work without delegated credentials' );
@@ -626,7 +626,7 @@ sub test_query
626626 ' postgres' ,
627627 " TABLE tf2;" ,
628628 connstr =>
629- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
629+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
630630 stdout => \$psql_out ,
631631 stderr => \$psql_stderr );
632632is($psql_rc , ' 3' ,
@@ -668,7 +668,7 @@ sub test_query
668668 ' test1' ,
669669 ' SELECT gss_authenticated AND NOT encrypted AND credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
670670 0,
671- ' gssencmode=prefer gssdelegation=enable ' ,
671+ ' gssencmode=prefer gssdelegation=1 ' ,
672672 ' succeeds with GSS-encrypted access preferred and hostnogssenc hba, but no encryption' ,
673673 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
674674 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=no, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -680,7 +680,7 @@ sub test_query
680680 ' test1' ,
681681 ' SELECT gss_authenticated AND NOT encrypted AND credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
682682 0,
683- ' gssencmode=disable gssdelegation=enable ' ,
683+ ' gssencmode=disable gssdelegation=1 ' ,
684684 ' succeeds with GSS encryption disabled and hostnogssenc hba' ,
685685 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
686686 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=no, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -691,7 +691,7 @@ sub test_query
691691 ' test1' ,
692692 " SELECT * FROM dblink('user=test1 dbname=$dbname host=$host hostaddr=$hostaddr port=$port ','select 1') as t1(c1 int);" ,
693693 qr / ^1$ / s ,
694- ' gssencmode=prefer gssdelegation=enable ' ,
694+ ' gssencmode=prefer gssdelegation=1 ' ,
695695 ' dblink works not-encrypted (server not configured to accept encrypted GSSAPI connections)'
696696);
697697
@@ -700,7 +700,7 @@ sub test_query
700700 ' test1' ,
701701 " TABLE tf1;" ,
702702 qr / ^1$ / s ,
703- ' gssencmode=prefer gssdelegation=enable ' ,
703+ ' gssencmode=prefer gssdelegation=1 ' ,
704704 ' postgres_fdw works not-encrypted (server not configured to accept encrypted GSSAPI connections)'
705705);
706706
@@ -711,7 +711,7 @@ sub test_query
711711 ' postgres' ,
712712 " SELECT * FROM dblink('user=test2 dbname=$dbname port=$port passfile=$pgpass ','select 1') as t1(c1 int);" ,
713713 connstr =>
714- " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=enable " ,
714+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=1 " ,
715715 stdout => \$psql_out ,
716716 stderr => \$psql_stderr );
717717is($psql_rc , ' 3' ,
@@ -730,7 +730,7 @@ sub test_query
730730 ' postgres' ,
731731 " TABLE tf2;" ,
732732 connstr =>
733- " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=enable " ,
733+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=1 " ,
734734 stdout => \$psql_out ,
735735 stderr => \$psql_stderr );
736736is($psql_rc , ' 3' ,
@@ -760,7 +760,7 @@ sub test_query
760760 ' test1' ,
761761 ' SELECT gss_authenticated AND encrypted AND credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
762762 0,
763- ' gssdelegation=enable ' ,
763+ ' gssdelegation=1 ' ,
764764 ' succeeds with include_realm=0 and defaults' ,
765765 " connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
766766 " connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -771,12 +771,12 @@ sub test_query
771771 ' test1' ,
772772 " SELECT * FROM dblink('user=test1 dbname=$dbname host=$host hostaddr=$hostaddr port=$port password=1234','select 1') as t1(c1 int);" ,
773773 qr / ^1$ / s ,
774- ' gssencmode=require gssdelegation=enable ' ,
774+ ' gssencmode=require gssdelegation=1 ' ,
775775 ' dblink works encrypted' );
776776
777777test_query(
778778 $node , ' test1' , " TABLE tf1;" , qr / ^1$ / s ,
779- ' gssencmode=require gssdelegation=enable ' ,
779+ ' gssencmode=require gssdelegation=1 ' ,
780780 ' postgres_fdw works encrypted' );
781781
782782# Reset pg_hba.conf, and cause a usermap failure with an authentication
0 commit comments