=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdist/docmd.c,v retrieving revision 1.33 retrieving revision 1.34 diff -c -r1.33 -r1.34 *** src/usr.bin/rdist/docmd.c 2017/07/09 14:04:50 1.33 --- src/usr.bin/rdist/docmd.c 2019/06/28 13:35:03 1.34 *************** *** 1,4 **** ! /* $OpenBSD: docmd.c,v 1.33 2017/07/09 14:04:50 espie Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: docmd.c,v 1.34 2019/06/28 13:35:03 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. *************** *** 115,125 **** debugmsg(DM_MISC, "notify() temp file = '%s'", file); ! if ((fd = open(file, O_RDONLY)) < 0) { error("%s: open for reading failed: %s", file, SYSERR); return; } ! if (fstat(fd, &stb) < 0) { error("%s: fstat failed: %s", file, SYSERR); (void) close(fd); return; --- 115,125 ---- debugmsg(DM_MISC, "notify() temp file = '%s'", file); ! if ((fd = open(file, O_RDONLY)) == -1) { error("%s: open for reading failed: %s", file, SYSERR); return; } ! if (fstat(fd, &stb) == -1) { error("%s: fstat failed: %s", file, SYSERR); (void) close(fd); return; *************** *** 671,677 **** while (*ptarget) ptarget++; } ! if (access(name, R_OK) < 0 || stat(name, &stb) < 0) { error("%s: cannot access file: %s", name, SYSERR); return; } --- 671,677 ---- while (*ptarget) ptarget++; } ! if (access(name, R_OK) == -1 || stat(name, &stb) == -1) { error("%s: cannot access file: %s", name, SYSERR); return; } *************** *** 730,736 **** cmd->c_label); return; } ! if (stat(stamp, &stb) < 0) { error("%s: stat failed: %s", stamp, SYSERR); return; } --- 730,736 ---- cmd->c_label); return; } ! if (stat(stamp, &stb) == -1) { error("%s: stat failed: %s", stamp, SYSERR); return; }