projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't redefine _PATH_TMP; don't assume it begins "/tmp/";
[unix-history]
/
usr
/
src
/
usr.bin
/
rdist
/
docmd.c
diff --git
a/usr/src/usr.bin/rdist/docmd.c
b/usr/src/usr.bin/rdist/docmd.c
index
5ac37ec
..
f7fe6c5
100644
(file)
--- a/
usr/src/usr.bin/rdist/docmd.c
+++ b/
usr/src/usr.bin/rdist/docmd.c
@@
-6,7
+6,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)docmd.c 5.
6
(Berkeley) %G%";
+static char sccsid[] = "@(#)docmd.c 5.
7
(Berkeley) %G%";
#endif /* not lint */
#include "defs.h"
#endif /* not lint */
#include "defs.h"
@@
-107,8
+107,8
@@
doarrow(filev, files, rhost, cmds)
signal(SIGPIPE, lostconn);
if (!makeconn(rhost))
return;
signal(SIGPIPE, lostconn);
if (!makeconn(rhost))
return;
- if ((lfp = fopen(tmpfile, "w")) == NULL) {
- fatal("cannot open %s\n", tmpfile);
+ if ((lfp = fopen(t
e
mpfile, "w")) == NULL) {
+ fatal("cannot open %s\n", t
e
mpfile);
exit(1);
}
}
exit(1);
}
}
@@
-142,9
+142,9
@@
done:
}
for (sc = cmds; sc != NULL; sc = sc->sc_next)
if (sc->sc_type == NOTIFY)
}
for (sc = cmds; sc != NULL; sc = sc->sc_next)
if (sc->sc_type == NOTIFY)
- notify(tmpfile, rhost, sc->sc_args, 0);
+ notify(t
e
mpfile, rhost, sc->sc_args, 0);
if (!nflag) {
if (!nflag) {
- (void) unlink(tmpfile);
+ (void) unlink(t
e
mpfile);
for (; ihead != NULL; ihead = ihead->nextp) {
free(ihead);
if ((opts & IGNLNKS) || ihead->count == 0)
for (; ihead != NULL; ihead = ihead->nextp) {
free(ihead);
if ((opts & IGNLNKS) || ihead->count == 0)
@@
-319,7
+319,7
@@
dodcolon(filev, files, stamp, cmds)
if (nflag || (options & VERIFY))
tfp = NULL;
else {
if (nflag || (options & VERIFY))
tfp = NULL;
else {
- if ((tfp = fopen(tmpfile, "w")) == NULL) {
+ if ((tfp = fopen(t
e
mpfile, "w")) == NULL) {
error("%s: %s\n", stamp, strerror(errno));
return;
}
error("%s: %s\n", stamp, strerror(errno));
return;
}
@@
-344,9
+344,9
@@
dodcolon(filev, files, stamp, cmds)
(void) fclose(tfp);
for (sc = cmds; sc != NULL; sc = sc->sc_next)
if (sc->sc_type == NOTIFY)
(void) fclose(tfp);
for (sc = cmds; sc != NULL; sc = sc->sc_next)
if (sc->sc_type == NOTIFY)
- notify(tmpfile, NULL, sc->sc_args, lastmod);
+ notify(t
e
mpfile, NULL, sc->sc_args, lastmod);
if (!nflag && !(options & VERIFY))
if (!nflag && !(options & VERIFY))
- (void) unlink(tmpfile);
+ (void) unlink(t
e
mpfile);
}
/*
}
/*