diff -ur davfs2-0.2.2.orig/src/util.c davfs2-0.2.2/src/util.c --- davfs2-0.2.2.orig/src/util.c 2003-12-07 20:39:48.000000000 -0800 +++ davfs2-0.2.2/src/util.c 2004-08-16 21:00:16.000000000 -0700 @@ -23,6 +23,9 @@ #include #include #include +#include +#include + /* Neon */ #include @@ -79,6 +82,7 @@ static int dav_mopt_parse_one(char *one_opt, dav_mount_opt *mopt) { char *name, *value = NULL; + struct termios termios; name = one_opt; if( (value = strchr(one_opt, '='))) @@ -107,7 +111,14 @@ mopt->username[strlen(mopt->username)-1] = '\000'; mopt->username = ne_strdup(mopt->username); printf("Password: "); + tcgetattr(STDOUT_FILENO, &termios); + /* Do not echo the password */ + termios.c_lflag &= ~(ECHO | ICANON); + tcsetattr(STDOUT_FILENO, TCSANOW, &termios); fgets(mopt->password,64,stdin); + termios.c_lflag |= (ECHO | ICANON); + tcsetattr(STDOUT_FILENO, TCSANOW, &termios); + printf("\n"); mopt->password[strlen(mopt->password)-1] = '\000'; mopt->username = ne_strdup(mopt->username); return 1;