Mercurial > dropbear
diff cli-auth.c @ 441:fdf06a5a54e4
Allow reading dbclient password from an environment var
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Mar 2007 06:30:11 +0000 |
parents | 8f3ec7c104d9 |
children | d58c478bd399 |
line wrap: on
line diff
--- a/cli-auth.c Sun Feb 25 09:48:13 2007 +0000 +++ b/cli-auth.c Sat Mar 17 06:30:11 2007 +0000 @@ -284,6 +284,15 @@ 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);