Deleted Added
sdiff udiff text old ( 102843 ) new ( 107487 )
full compact
1/*
2 * Copyright (c) 1995, Cyclic Software, Bloomington, IN, USA
3 *
4 * You may distribute under the terms of the GNU General Public License as
5 * specified in the README file that comes with CVS.
6 *
7 * Allow user to log in for an authenticating server.
8 *
9 * $FreeBSD: head/contrib/cvs/src/login.c 107487 2002-12-02 03:17:49Z peter $
10 */
11
12#include "cvs.h"
13#include "getline.h"
14
15#ifdef AUTH_CLIENT_SUPPORT /* This covers the rest of the file. */
16
17#ifdef HAVE_GETPASSPHRASE

--- 44 unchanged lines hidden (view full) ---

62 passwords in the registry or something (??). And .cvsrc
63 and such too? Wonder what WinCVS does (about .cvsrc, the
64 right thing for a GUI is to just store the password in
65 memory only)... */
66 error (1, 0, "could not find out home directory");
67 return (char *) NULL;
68 }
69
70 passfile = strcat_filename_onto_homedir (homedir, CVS_PASSWORD_FILE);
71
72 /* Safety first and last, Scouts. */
73 if (isfile (passfile))
74 /* xchmod() is too polite. */
75 chmod (passfile, 0600);
76
77 return passfile;
78}

--- 221 unchanged lines hidden (view full) ---

300 int save_errno = 0;
301
302 if (root->method != pserver_method)
303 {
304 error (0, 0, "internal error: can only call password_entry_operation with pserver method");
305 error (1, 0, "CVSROOT: %s", root->original);
306 }
307
308 cvsroot_canonical = normalize_cvsroot (root);
309
310 /* Yes, the method below reads the user's password file twice when we have
311 * to delete an entry. It's inefficient, but we're not talking about a gig of
312 * data here.
313 */
314
315 passfile = construct_cvspass_filename ();
316 fp = CVS_FOPEN (passfile, "r");
317 if (fp == NULL)
318 {
319 error (0, errno, "warning: failed to open %s for reading", passfile);
320 goto process;
321 }
322
323 /* Check each line to see if we have this entry already. */
324 line = 0;
325 while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
326 {
327 line++;
328 password = password_entry_parseline(cvsroot_canonical, 1, line, linebuf);
329 if (password != NULL)
330 /* this is it! break out and deal with linebuf */

--- 330 unchanged lines hidden ---