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 302225 Details for
Bug 442187
[PATCH] support for providing console password in STDIN
[?]
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]
A better patch
password_from_stdin_or_file.patch (text/plain), 2.85 KB, created by
Aleksander Adamowski
on 2008-04-12 15:43:06 UTC
(
hide
)
Description:
A better patch
Filename:
MIME Type:
Creator:
Aleksander Adamowski
Created:
2008-04-12 15:43:06 UTC
Size:
2.85 KB
patch
obsolete
>Index: src/com/netscape/management/client/console/Console.java >=================================================================== >RCS file: /cvs/dirsec/console/src/com/netscape/management/client/console/Console.java,v >retrieving revision 1.12 >diff -u -r1.12 Console.java >--- src/com/netscape/management/client/console/Console.java 7 Dec 2007 20:44:38 -0000 1.12 >+++ src/com/netscape/management/client/console/Console.java 12 Apr 2008 15:35:48 -0000 >@@ -1515,7 +1515,7 @@ > */ > > static public void main(String argv[]) { >- GetOpt opt = new GetOpt("h:a:A:f:l:u:w:s:D:x:", argv); >+ GetOpt opt = new GetOpt("h:a:A:f:l:u:w:y:s:D:x:", argv); > > if (opt.hasOption('f')) { > String outFile = opt.getOptionParam('f'); >@@ -1594,6 +1594,10 @@ > System.err.println(" -f <file> capture stderr and stdout to <file> (like Unix tee command)"); > System.err.println(" -s server DN (cn=...) or instance ID (e.g. slapd-host)"); > System.err.println(" -x extra options (javalaf,nowinpos,nologo)"); >+ System.err.println(" -u username"); >+ System.err.println(" -w password"); >+ System.err.println(" -w - (read password from standard input)"); >+ System.err.println(" -y password_file (read password from a file)"); > System.err.println("\nExample: Console -a https://hostname:10021 -l en"); > waitForKeyPress(); // allow the user to read the msg on Win NT > System.exit(0); >@@ -1632,7 +1636,32 @@ > String password = null; > if (opt.hasOption('w')) { > password = opt.getOptionParam('w'); >+ // GetOpt works in such a twisted way that "-" argument values >+ // result in null values received: >+ if (password == null || password.equals("-")) { >+ try { >+ password = (new BufferedReader(new InputStreamReader( >+ System.in))).readLine(); >+ } catch (IOException e) { >+ System.err >+ .println("Problem reading password from standard input " >+ + e.getMessage()); >+ } >+ } > } >+ >+ if (opt.hasOption('y')) { >+ String passwdFile = opt.getOptionParam('y'); >+ try { >+ password = (new BufferedReader(new FileReader(passwdFile))).readLine(); >+ } catch (FileNotFoundException e) { >+ System.err.println("Password file not found: " + e.getMessage()); >+ } catch (IOException e) { >+ System.err.println("Problem reading from password file: " + e.getMessage()); >+ } >+ } >+ >+ > > _console = new Console(sAdminURL, localAdminURL, sLang, host, uid, password); > return;
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 442187
:
302223
|
302224
|
302225
|
302231
|
302232
|
310084