diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-07-06 15:20:46 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-07-06 15:20:46 +1000 |
commit | 8661b569039c116e9439c1c17cc34ca9dbe25847 (patch) | |
tree | 8e02b2f5259defff78ca817091eb0ad24cdf8f14 /loginrec.c | |
parent | 0a4f04b5b255d116e4de441c93a867aac9f616ee (diff) |
- (dtucker) [ssh-rand-helper.c loginrec.c]
Apply atomicio typing change to these too.
Diffstat (limited to 'loginrec.c')
-rw-r--r-- | loginrec.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 | ||
161 | RCSID("$Id: loginrec.c,v 1.51 2003/05/10 13:42:12 djm Exp $"); | 161 | RCSID("$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)); |