Check for tty before calling dav_user_input_hidden
This commit is contained in:
parent
47db2ada78
commit
e4ea0d0619
@ -1,6 +1,10 @@
|
|||||||
ChangeLog for davfs2
|
ChangeLog for davfs2
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
2009-10-17 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
|
* mount_davfs.c, parse_secrets:
|
||||||
|
Check for tty before calling dav_user_input_hidden.
|
||||||
|
|
||||||
2009-10-14 Werner Baumann (werner.baumann@onlinehome.de)
|
2009-10-14 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
Add support for neon 0.29.
|
Add support for neon 0.29.
|
||||||
|
1
THANKS
1
THANKS
@ -38,6 +38,7 @@ Hyunsop Kim <hskim@taegu.ac.kr>
|
|||||||
Vítězslav Kotrla <vitko@post.cz>
|
Vítězslav Kotrla <vitko@post.cz>
|
||||||
Alexander Jenisch <enti@users.sourceforge.net>
|
Alexander Jenisch <enti@users.sourceforge.net>
|
||||||
joe <josephb@users.sourceforge.net>
|
joe <josephb@users.sourceforge.net>
|
||||||
|
Doug Kelly <dougk@dougk-ff7.net>
|
||||||
Thomas Kemmer <tkemmer@users.sourceforge.net>
|
Thomas Kemmer <tkemmer@users.sourceforge.net>
|
||||||
SungHun Kim <hunkim@users.sourceforge.net>
|
SungHun Kim <hunkim@users.sourceforge.net>
|
||||||
Alan Knowles <alan_k@users.sourceforge.net>
|
Alan Knowles <alan_k@users.sourceforge.net>
|
||||||
|
@ -1149,7 +1149,11 @@ parse_secrets(dav_args *args)
|
|||||||
if (args->askauth && args->useproxy && args->p_user && !args->p_passwd) {
|
if (args->askauth && args->useproxy && args->p_user && !args->p_passwd) {
|
||||||
printf(_("Please enter the password to authenticate user %s with proxy\n"
|
printf(_("Please enter the password to authenticate user %s with proxy\n"
|
||||||
"%s or hit enter for none.\n"), args->p_user, args->p_host);
|
"%s or hit enter for none.\n"), args->p_user, args->p_host);
|
||||||
|
if (isatty(fileno(stdin))) {
|
||||||
args->p_passwd = dav_user_input_hidden(_("Password: "));
|
args->p_passwd = dav_user_input_hidden(_("Password: "));
|
||||||
|
} else {
|
||||||
|
args->p_passwd = user_input(_("Password: "));
|
||||||
|
}
|
||||||
if (args->p_passwd && strlen(args->p_passwd) == 0) {
|
if (args->p_passwd && strlen(args->p_passwd) == 0) {
|
||||||
free(args->p_passwd);
|
free(args->p_passwd);
|
||||||
args->p_passwd = NULL;
|
args->p_passwd = NULL;
|
||||||
@ -1165,7 +1169,11 @@ parse_secrets(dav_args *args)
|
|||||||
if (args->askauth && args->username && !args->password) {
|
if (args->askauth && args->username && !args->password) {
|
||||||
printf(_("Please enter the password to authenticate user %s with "
|
printf(_("Please enter the password to authenticate user %s with "
|
||||||
"server\n%s or hit enter for none.\n"), args->username, url);
|
"server\n%s or hit enter for none.\n"), args->username, url);
|
||||||
|
if (isatty(fileno(stdin))) {
|
||||||
args->password = dav_user_input_hidden(_("Password: "));
|
args->password = dav_user_input_hidden(_("Password: "));
|
||||||
|
} else {
|
||||||
|
args->password = user_input(_("Password: "));
|
||||||
|
}
|
||||||
if (args->password && strlen(args->password) == 0) {
|
if (args->password && strlen(args->password) == 0) {
|
||||||
free(args->password);
|
free(args->password);
|
||||||
args->password = NULL;
|
args->password = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user