Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 144501 Details for
Bug 200630
Review Request: postgresql_autodoc - PostgreSQL AutoDoc Utility
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to add prompt for password
postgresql_autodoc-passwd.patch (text/plain), 2.46 KB, created by
Toshio Kuratomi
on 2006-12-28 22:26:29 UTC
(
hide
)
Description:
Patch to add prompt for password
Filename:
MIME Type:
Creator:
Toshio Kuratomi
Created:
2006-12-28 22:26:29 UTC
Size:
2.46 KB
patch
obsolete
>Index: postgresql_autodoc/postgresql_autodoc.pl >=================================================================== >--- postgresql_autodoc.orig/postgresql_autodoc.pl >+++ postgresql_autodoc/postgresql_autodoc.pl >@@ -57,6 +57,9 @@ use Fcntl; > # Allows file templates > use HTML::Template; > >+# Allow reading a password from stdin >+use Term::ReadKey; >+ > sub main($) > { > my ($ARGV) = @_; >@@ -80,6 +83,9 @@ sub main($) > my $dbport = $ENV{'PGPORT'}; > $dbport ||= ""; > >+ # Determine whether we need a password to connect >+ my $needpass = ""; >+ > my $dbpass = ""; > my $output_filename_base = $database; > >@@ -140,6 +146,12 @@ sub main($) > last; > }; > >+ # Make sure we get a password before attempting to conenct >+ /^--password[^=]/ && do { >+ $needpass = 1; >+ last; >+ }; >+ > # Set the base of the filename. The extensions pulled > # from the templates will be appended to this name > /^-f$/ && do { >@@ -189,6 +201,17 @@ Msg > ; > } > >+ # If needpass has been set but no password was provided, prompt the user >+ # for a password. >+ if ($needpass && !$dbpass) { >+ print "Password: "; >+ ReadMode 'noecho'; >+ $dbpass = ReadLine 0; >+ chomp $dbpass; >+ ReadMode 'normal'; >+ print "\n"; >+ } >+ > # Database Connection > my $dsn = "dbi:Pg:dbname=$database"; > $dsn .= ";host=$dbhost" if ( "$dbhost" ne "" ); >@@ -2058,6 +2081,7 @@ Options: > -p <port> Specify database server port (default: 5432) > -u <username> Specify database username (default: $dbuser) > --password=<pw> Specify database password (default: blank) >+ --password Have $basename prompt for a password > > -l <path> Path to the templates (default: @@TEMPLATE-DIR@@) > -t <output> Type of output wanted (default: All in template library) >Index: postgresql_autodoc/configure.ac >=================================================================== >--- postgresql_autodoc.orig/configure.ac >+++ postgresql_autodoc/configure.ac >@@ -37,9 +37,10 @@ AC_SUBST(PERL) > # DBD::Pg > # Fcntl > # HTML::Template >+# Term::ReadKey > # > # Output of if test redirected to /dev/null to keep quiet >-for module in DBI DBD::Pg Fcntl HTML::Template ; do >+for module in DBI DBD::Pg Fcntl HTML::Template Term::ReadKey ; do > AC_MSG_CHECKING(${module}) > if [ ! (${PERL} -e "use ${module}" 2>&1 /dev/null ) ]; then > AC_MSG_RESULT(no)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 200630
: 144501