summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-07 12:03:14 +1000
committerDamien Miller <djm@mindrot.org>2000-05-07 12:03:14 +1000
commite247cc402bc391650f014316363dbce78ad85dc7 (patch)
tree65d72c3d3514c6119f47017f14b71ed153485a5d /scp.c
parent0437b33e54fd72060d17908d6abf96bfabaacad2 (diff)
- Remove references to SSLeay.
- Big OpenBSD CVS update - markus@cvs.openbsd.org [clientloop.c] - typo [session.c] - update proctitle on pty alloc/dealloc, e.g. w/ windows client [session.c] - update proctitle for proto 1, too [channels.h nchan.c serverloop.c session.c sshd.c] - use c-style comments - deraadt@cvs.openbsd.org [scp.c] - more atomicio - markus@cvs.openbsd.org [channels.c] - set O_NONBLOCK [ssh.1] - update AUTHOR [readconf.c ssh-keygen.c ssh.h] - default DSA key file ~/.ssh/id_dsa [clientloop.c] - typo, rm verbose debug - deraadt@cvs.openbsd.org [ssh-keygen.1] - document DSA use of ssh-keygen [sshd.8] - a start at describing what i understand of the DSA side [ssh-keygen.1] - document -X and -x [ssh-keygen.c] - simplify usage - markus@cvs.openbsd.org [sshd.8] - there is no rhosts_dsa [ssh-keygen.1] - document -y, update -X,-x [nchan.c] - fix close for non-open ssh1 channels [servconf.c servconf.h ssh.h sshd.8 sshd.c ] - s/DsaKey/HostDSAKey/, document option [sshconnect2.c] - respect number_of_password_prompts [channels.c channels.h servconf.c servconf.h session.c sshd.8] - GatewayPorts for sshd, ok deraadt@ [ssh-add.1 ssh-agent.1 ssh.1] - more doc on: DSA, id_dsa, known_hosts2, authorized_keys2 [ssh.1] - more info on proto 2 [sshd.8] - sync AUTHOR w/ ssh.1 [key.c key.h sshconnect.c] - print key type when talking about host keys [packet.c] - clear padding in ssh2 [dsa.c key.c radix.c ssh.h sshconnect1.c uuencode.c uuencode.h] - replace broken uuencode w/ libc b64_ntop [auth2.c] - log failure before sending the reply [key.c radix.c uuencode.c] - remote trailing comments before calling __b64_pton [auth2.c readconf.c readconf.h servconf.c servconf.h ssh.1] [sshconnect2.c sshd.8] - add DSAAuthetication option to ssh/sshd, document SSH2 in sshd.8 - Bring in b64_ntop and b64_pton from OpenBSD libc (bsd-base64.[ch])
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/scp.c b/scp.c
index 2ac106290..2831f9b99 100644
--- a/scp.c
+++ b/scp.c
@@ -45,7 +45,7 @@
45 */ 45 */
46 46
47#include "includes.h" 47#include "includes.h"
48RCSID("$Id: scp.c,v 1.21 2000/05/01 11:10:33 damien Exp $"); 48RCSID("$Id: scp.c,v 1.22 2000/05/07 02:03:17 damien Exp $");
49 49
50#include "ssh.h" 50#include "ssh.h"
51#include "xmalloc.h" 51#include "xmalloc.h"
@@ -573,7 +573,7 @@ next: (void) close(fd);
573 if (i + amt > stb.st_size) 573 if (i + amt > stb.st_size)
574 amt = stb.st_size - i; 574 amt = stb.st_size - i;
575 if (!haderr) { 575 if (!haderr) {
576 result = read(fd, bp->buf, amt); 576 result = atomicio(read, fd, bp->buf, amt);
577 if (result != amt) 577 if (result != amt)
578 haderr = result >= 0 ? EIO : errno; 578 haderr = result >= 0 ? EIO : errno;
579 } 579 }
@@ -692,12 +692,12 @@ sink(argc, argv)
692 targisdir = 1; 692 targisdir = 1;
693 for (first = 1;; first = 0) { 693 for (first = 1;; first = 0) {
694 cp = buf; 694 cp = buf;
695 if (read(remin, cp, 1) <= 0) 695 if (atomicio(read, remin, cp, 1) <= 0)
696 return; 696 return;
697 if (*cp++ == '\n') 697 if (*cp++ == '\n')
698 SCREWUP("unexpected <newline>"); 698 SCREWUP("unexpected <newline>");
699 do { 699 do {
700 if (read(remin, &ch, sizeof(ch)) != sizeof(ch)) 700 if (atomicio(read, remin, &ch, sizeof(ch)) != sizeof(ch))
701 SCREWUP("lost connection"); 701 SCREWUP("lost connection");
702 *cp++ = ch; 702 *cp++ = ch;
703 } while (cp < &buf[sizeof(buf) - 1] && ch != '\n'); 703 } while (cp < &buf[sizeof(buf) - 1] && ch != '\n');
@@ -835,7 +835,7 @@ bad: run_err("%s: %s", np, strerror(errno));
835 amt = size - i; 835 amt = size - i;
836 count += amt; 836 count += amt;
837 do { 837 do {
838 j = read(remin, cp, amt); 838 j = atomicio(read, remin, cp, amt);
839 if (j <= 0) { 839 if (j <= 0) {
840 run_err("%s", j ? strerror(errno) : 840 run_err("%s", j ? strerror(errno) :
841 "dropped connection"); 841 "dropped connection");
@@ -848,7 +848,7 @@ bad: run_err("%s: %s", np, strerror(errno));
848 if (count == bp->cnt) { 848 if (count == bp->cnt) {
849 /* Keep reading so we stay sync'd up. */ 849 /* Keep reading so we stay sync'd up. */
850 if (wrerr == NO) { 850 if (wrerr == NO) {
851 j = write(ofd, bp->buf, count); 851 j = atomicio(write, ofd, bp->buf, count);
852 if (j != count) { 852 if (j != count) {
853 wrerr = YES; 853 wrerr = YES;
854 wrerrno = j >= 0 ? EIO : errno; 854 wrerrno = j >= 0 ? EIO : errno;
@@ -861,7 +861,7 @@ bad: run_err("%s: %s", np, strerror(errno));
861 if (showprogress) 861 if (showprogress)
862 progressmeter(1); 862 progressmeter(1);
863 if (count != 0 && wrerr == NO && 863 if (count != 0 && wrerr == NO &&
864 (j = write(ofd, bp->buf, count)) != count) { 864 (j = atomicio(write, ofd, bp->buf, count)) != count) {
865 wrerr = YES; 865 wrerr = YES;
866 wrerrno = j >= 0 ? EIO : errno; 866 wrerrno = j >= 0 ? EIO : errno;
867 } 867 }
@@ -913,7 +913,7 @@ response()
913{ 913{
914 char ch, *cp, resp, rbuf[2048]; 914 char ch, *cp, resp, rbuf[2048];
915 915
916 if (read(remin, &resp, sizeof(resp)) != sizeof(resp)) 916 if (atomicio(read, remin, &resp, sizeof(resp)) != sizeof(resp))
917 lostconn(0); 917 lostconn(0);
918 918
919 cp = rbuf; 919 cp = rbuf;
@@ -926,7 +926,7 @@ response()
926 case 1: /* error, followed by error msg */ 926 case 1: /* error, followed by error msg */
927 case 2: /* fatal error, "" */ 927 case 2: /* fatal error, "" */
928 do { 928 do {
929 if (read(remin, &ch, sizeof(ch)) != sizeof(ch)) 929 if (atomicio(read, remin, &ch, sizeof(ch)) != sizeof(ch))
930 lostconn(0); 930 lostconn(0);
931 *cp++ = ch; 931 *cp++ = ch;
932 } while (cp < &rbuf[sizeof(rbuf) - 1] && ch != '\n'); 932 } while (cp < &rbuf[sizeof(rbuf) - 1] && ch != '\n');
@@ -1008,7 +1008,7 @@ run_err(const char *fmt,...)
1008 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1008 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1009 * SUCH DAMAGE. 1009 * SUCH DAMAGE.
1010 * 1010 *
1011 * $Id: scp.c,v 1.21 2000/05/01 11:10:33 damien Exp $ 1011 * $Id: scp.c,v 1.22 2000/05/07 02:03:17 damien Exp $
1012 */ 1012 */
1013 1013
1014char * 1014char *