summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--loginrec.c10
-rw-r--r--ssh-rand-helper.c8
3 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ee25f842..8bc434acb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120030706
2 - (dtucker) [ssh-rand-helper.c loginrec.c]
3 Apply atomicio typing change to these too.
4
120030703 520030703
2 - (dtucker) OpenBSD CVS Sync 6 - (dtucker) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2003/06/28 07:48:10 7 - djm@cvs.openbsd.org 2003/06/28 07:48:10
@@ -654,4 +658,4 @@
654 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 658 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
655 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 659 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
656 660
657$Id: ChangeLog,v 1.2844 2003/07/03 10:37:47 dtucker Exp $ 661$Id: ChangeLog,v 1.2845 2003/07/06 05:20:46 dtucker Exp $
diff --git a/loginrec.c b/loginrec.c
index 2d6bc6963..bdac3e959 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -158,7 +158,7 @@
158#include "log.h" 158#include "log.h"
159#include "atomicio.h" 159#include "atomicio.h"
160 160
161RCSID("$Id: loginrec.c,v 1.51 2003/05/10 13:42:12 djm Exp $"); 161RCSID("$Id: loginrec.c,v 1.52 2003/07/06 05:20:46 dtucker Exp $");
162 162
163#ifdef HAVE_UTIL_H 163#ifdef HAVE_UTIL_H
164# include <util.h> 164# include <util.h>
@@ -837,7 +837,7 @@ utmp_write_direct(struct logininfo *li, struct utmp *ut)
837 } 837 }
838 838
839 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); 839 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
840 if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut)) 840 if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut))
841 logit("utmp_write_direct: error writing %s: %s", 841 logit("utmp_write_direct: error writing %s: %s",
842 UTMP_FILE, strerror(errno)); 842 UTMP_FILE, strerror(errno));
843 843
@@ -1026,7 +1026,7 @@ wtmp_write(struct logininfo *li, struct utmp *ut)
1026 return 0; 1026 return 0;
1027 } 1027 }
1028 if (fstat(fd, &buf) == 0) 1028 if (fstat(fd, &buf) == 0)
1029 if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut)) { 1029 if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut)) {
1030 ftruncate(fd, buf.st_size); 1030 ftruncate(fd, buf.st_size);
1031 logit("wtmp_write: problem writing %s: %s", 1031 logit("wtmp_write: problem writing %s: %s",
1032 WTMP_FILE, strerror(errno)); 1032 WTMP_FILE, strerror(errno));
@@ -1193,7 +1193,7 @@ wtmpx_write(struct logininfo *li, struct utmpx *utx)
1193 } 1193 }
1194 1194
1195 if (fstat(fd, &buf) == 0) 1195 if (fstat(fd, &buf) == 0)
1196 if (atomicio(write, fd, utx, sizeof(*utx)) != sizeof(*utx)) { 1196 if (atomicio(vwrite, fd, utx, sizeof(*utx)) != sizeof(*utx)) {
1197 ftruncate(fd, buf.st_size); 1197 ftruncate(fd, buf.st_size);
1198 logit("wtmpx_write: problem writing %s: %s", 1198 logit("wtmpx_write: problem writing %s: %s",
1199 WTMPX_FILE, strerror(errno)); 1199 WTMPX_FILE, strerror(errno));
@@ -1482,7 +1482,7 @@ lastlog_perform_login(struct logininfo *li)
1482 return(0); 1482 return(0);
1483 1483
1484 /* write the entry */ 1484 /* write the entry */
1485 if (atomicio(write, fd, &last, sizeof(last)) != sizeof(last)) { 1485 if (atomicio(vwrite, fd, &last, sizeof(last)) != sizeof(last)) {
1486 close(fd); 1486 close(fd);
1487 logit("lastlog_write_filemode: Error writing to %s: %s", 1487 logit("lastlog_write_filemode: Error writing to %s: %s",
1488 LASTLOG_FILE, strerror(errno)); 1488 LASTLOG_FILE, strerror(errno));
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index a233b1e9c..88e6e7c05 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -39,7 +39,7 @@
39#include "pathnames.h" 39#include "pathnames.h"
40#include "log.h" 40#include "log.h"
41 41
42RCSID("$Id: ssh-rand-helper.c,v 1.11 2003/05/16 05:51:45 djm Exp $"); 42RCSID("$Id: ssh-rand-helper.c,v 1.12 2003/07/06 05:20:46 dtucker Exp $");
43 43
44/* Number of bytes we write out */ 44/* Number of bytes we write out */
45#define OUTPUT_SEED_SIZE 48 45#define OUTPUT_SEED_SIZE 48
@@ -187,7 +187,7 @@ reopen:
187 msg[0] = 0x02; 187 msg[0] = 0x02;
188 msg[1] = len; 188 msg[1] = len;
189 189
190 if (atomicio(write, fd, msg, sizeof(msg)) != sizeof(msg)) { 190 if (atomicio(vwrite, fd, msg, sizeof(msg)) != sizeof(msg)) {
191 if (errno == EPIPE && errors < 10) { 191 if (errno == EPIPE && errors < 10) {
192 close(fd); 192 close(fd);
193 errors++; 193 errors++;
@@ -572,7 +572,7 @@ prng_write_seedfile(void)
572 debug("WARNING: couldn't access PRNG seedfile %.100s " 572 debug("WARNING: couldn't access PRNG seedfile %.100s "
573 "(%.100s)", filename, strerror(errno)); 573 "(%.100s)", filename, strerror(errno));
574 } else { 574 } else {
575 if (atomicio(write, fd, &seed, sizeof(seed)) < sizeof(seed)) 575 if (atomicio(vwrite, fd, &seed, sizeof(seed)) < sizeof(seed))
576 fatal("problem writing PRNG seedfile %.100s " 576 fatal("problem writing PRNG seedfile %.100s "
577 "(%.100s)", filename, strerror(errno)); 577 "(%.100s)", filename, strerror(errno));
578 close(fd); 578 close(fd);
@@ -858,7 +858,7 @@ main(int argc, char **argv)
858 printf("%02x", (unsigned char)(buf[ret])); 858 printf("%02x", (unsigned char)(buf[ret]));
859 printf("\n"); 859 printf("\n");
860 } else 860 } else
861 ret = atomicio(write, STDOUT_FILENO, buf, bytes); 861 ret = atomicio(vwrite, STDOUT_FILENO, buf, bytes);
862 862
863 memset(buf, '\0', bytes); 863 memset(buf, '\0', bytes);
864 xfree(buf); 864 xfree(buf);