diff options
author | peter <peter@FreeBSD.org> | 2002-09-02 05:57:14 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-09-02 05:57:14 +0000 |
commit | a2b6a3a9b8cf8113c377699deba118c6b57d881e (patch) | |
tree | 32949f652e8da27bbd93bd53f3dc7bca126e7e9e /contrib/cvs/src/login.c | |
parent | 9977823bcf0469bcd2b9a4a936f590610431dc1e (diff) | |
download | FreeBSD-src-a2b6a3a9b8cf8113c377699deba118c6b57d881e.zip FreeBSD-src-a2b6a3a9b8cf8113c377699deba118c6b57d881e.tar.gz |
Initial merge of 1.11.1p1 -> 1.11.2 changes onto mainline
Diffstat (limited to 'contrib/cvs/src/login.c')
-rw-r--r-- | contrib/cvs/src/login.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/cvs/src/login.c b/contrib/cvs/src/login.c index df6abe1..a90212f 100644 --- a/contrib/cvs/src/login.c +++ b/contrib/cvs/src/login.c @@ -324,8 +324,8 @@ password_entry_operation (operation, root, newpassword) fp = CVS_FOPEN (passfile, "r"); if (fp == NULL) { - error (0, errno, "failed to open %s for reading", passfile); - goto error_exit; + error (0, errno, "warning: failed to open %s for reading", passfile); + goto process; } cvsroot_canonical = normalize_cvsroot (root); @@ -363,6 +363,8 @@ password_entry_operation (operation, root, newpassword) password = xstrdup (password); } +process: + /* might as well return now */ if (operation == password_entry_lookup) goto out; @@ -552,6 +554,12 @@ login (argc, argv) { char *tmp; tmp = GETPASS ("CVS password: "); + /* Must deal with a NULL return value here. I haven't managed to + * disconnect the CVS process from the tty and force a NULL return + * in sanity.sh, but the Linux version of getpass is documented + * to return NULL when it can't open /dev/tty... + */ + if (!tmp) error (1, errno, "login: Failed to read password."); typed_password = scramble (tmp); memset (tmp, 0, strlen (tmp)); } @@ -562,7 +570,7 @@ login (argc, argv) * will get zeroed by connect_to_server(). */ cvs_password = xstrdup (typed_password); - connect_to_pserver (NULL, NULL, 1, 0); + connect_to_pserver (current_parsed_root, NULL, NULL, 1, 0); password_entry_operation (password_entry_add, current_parsed_root, typed_password); |