Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/ftp



Module Name:    src
Committed By:   lukem
Date:           Fri Jun 10 00:18:47 UTC 2005

Modified Files:
        src/usr.bin/ftp: cmds.c extern.h fetch.c ftp.c main.c ruserpass.c
            util.c version.h

Log Message:
Implement:
    int getline(FILE *stream, char *buf, size_t buflen, const char **errormsg)
        Read a line from the FILE stream into buf/buflen using fgets(), so up
        to buflen-1 chars will be read and the result will be NUL terminated.
        If the line has a trailing newline it will be removed.
        If the line is too long, excess characters will be read until
        newline/EOF/error.
        Various -ve return values indicate different errors, and errormsg
        will be changed to an error description if it's not NULL.

Convert to use getline() instead of fgets() whenever reading user input
to ensure that an overly long input line doesn't leave excess characters
for the next input operation to accidentally use as input.

Zero out the password & account after we've finished with it.

Consistently use getpass(3) (i.e, character echo suppressed) when
reading the account data.  For some reason, historically the "login"
code suppressed echo for Account: yet the "user" command did not!

Display the hostname in the "getaddrinfo failed" warning.

Appease some -Wcast-qual warnings.  Fixing all of these requires
significant code refactoring.  (mmm, legacy code).


To generate a diff of this commit:
cvs rdiff -r1.114 -r1.115 src/usr.bin/ftp/cmds.c
cvs rdiff -r1.68 -r1.69 src/usr.bin/ftp/extern.h
cvs rdiff -r1.161 -r1.162 src/usr.bin/ftp/fetch.c
cvs rdiff -r1.133 -r1.134 src/usr.bin/ftp/ftp.c
cvs rdiff -r1.96 -r1.97 src/usr.bin/ftp/main.c
cvs rdiff -r1.29 -r1.30 src/usr.bin/ftp/ruserpass.c
cvs rdiff -r1.128 -r1.129 src/usr.bin/ftp/util.c
cvs rdiff -r1.54 -r1.55 src/usr.bin/ftp/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index