code = errno;
com_err(whoami, errno, "creating file %s (get_file)", pathname);
send_int(conn, code);
- if (setuid(0) < 0)
- {
- com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
- exit(1);
- }
return 1;
}
unlink(pathname);
ftruncate(fd, 0);
close(fd);
-
- if (setuid(0) < 0)
- {
- com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
- exit(1);
- }
return 1;
}
n_written += n_wrote;
{
/* get_block has already printed a message */
unlink(pathname);
- if (setuid(0) < 0)
- {
- com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
- exit(1);
- }
return 1;
}
n_written += n_got;
fsync(fd);
close(fd);
- if (setuid(0) < 0)
- {
- com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
- exit(1);
- }
-
/* validate checksum */
found_checksum = checksum_file(pathname);
if (checksum != found_checksum)