diff options
author | Matt Johnston <matt@ucc.asn.au> | 2007-03-17 06:30:11 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2007-03-17 06:30:11 +0000 |
commit | a4130263bd36edad8c4bd8b9daf729148f1c0d8f (patch) | |
tree | 718b3ea053c4c40ccba3d8138787487af236b1aa /cli-auth.c | |
parent | 0ffc17e48184077239a678af2b9334a1c094b1ec (diff) |
Allow reading dbclient password from an environment var
--HG--
extra : convert_revision : 9a5277c058af96e8fb7a3ade558dd1aeeafa1d3a
Diffstat (limited to 'cli-auth.c')
-rw-r--r-- | cli-auth.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -284,6 +284,15 @@ void cli_auth_try() { char* getpass_or_cancel(char* prompt) { char* password = NULL; + +#ifdef DROPBEAR_PASSWORD_ENV + /* Password provided in an environment var */ + password = getenv(DROPBEAR_PASSWORD_ENV); + if (password) + { + return password; + } +#endif password = getpass(prompt); |