aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/rdist
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1997-02-23 23:44:01 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1997-02-23 23:44:01 +0000
commit43d0d0e4ee94c8360623efbb3c308f4745da61d2 (patch)
tree4ef1462ddd5db0f483213bd5e7a8520464773fb7 /usr.bin/rdist
parentaec04a773fea303f56883088a6a0168a5fbdc17a (diff)
downloadsrc-43d0d0e4ee94c8360623efbb3c308f4745da61d2.tar.gz
src-43d0d0e4ee94c8360623efbb3c308f4745da61d2.zip
Notes
Diffstat (limited to 'usr.bin/rdist')
-rw-r--r--usr.bin/rdist/defs.h3
-rw-r--r--usr.bin/rdist/docmd.c4
-rw-r--r--usr.bin/rdist/server.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/rdist/defs.h b/usr.bin/rdist/defs.h
index 8e4f3818ac2a..cc484a232625 100644
--- a/usr.bin/rdist/defs.h
+++ b/usr.bin/rdist/defs.h
@@ -157,6 +157,7 @@ extern struct passwd *pw; /* pointer to static area used by getpwent */
extern struct group *gr; /* pointer to static area used by getgrent */
extern char host[]; /* host name of master copy */
extern char buf[BUFSIZ]; /* general purpose buffer */
+extern char target[BUFSIZ]; /* target/source directory name */
extern char *path_rsh; /* rsh command to use */
int any __P((int, char *));
@@ -168,7 +169,7 @@ void error __P((const char *, ...));
int except __P((char *));
struct namelist *
expand __P((struct namelist *, int));
-char *exptilde __P((char [], char *));
+char *exptilde __P((char [], char *, int));
void fatal __P((const char *, ...));
int inlist __P((struct namelist *, char *));
void insert __P((char *,
diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c
index ebc6470a003b..fc937ae8c6a2 100644
--- a/usr.bin/rdist/docmd.c
+++ b/usr.bin/rdist/docmd.c
@@ -34,7 +34,7 @@
#ifndef lint
/*static char sccsid[] = "From: @(#)docmd.c 8.1 (Berkeley) 6/9/93";*/
static const char rcsid[] =
- "$Id: docmd.c,v 1.5 1996/08/10 07:54:12 peter Exp $";
+ "$Id: docmd.c,v 1.6 1996/09/24 08:06:21 bde Exp $";
#endif /* not lint */
#include "defs.h"
@@ -479,7 +479,7 @@ cmptime(name)
* first time cmptime() is called?
*/
if (tp == NULL) {
- if (exptilde(target, name) == NULL)
+ if (exptilde(target, name, sizeof(target)) == NULL)
return;
tp = name = target;
while (*tp)
diff --git a/usr.bin/rdist/server.c b/usr.bin/rdist/server.c
index e3a12fb4ceee..37ae9c55fa79 100644
--- a/usr.bin/rdist/server.c
+++ b/usr.bin/rdist/server.c
@@ -115,7 +115,7 @@ server()
case 't': /* init target file/directory name */
catname = 0;
dotarget:
- if (exptilde(target, cp) == NULL)
+ if (exptilde(target, cp, sizeof(target)) == NULL)
continue;
tp = target;
while (*tp)
@@ -176,7 +176,7 @@ server()
continue;
}
if (*cp == '~') {
- if (exptilde(buf, cp) == NULL)
+ if (exptilde(buf, cp, sizeof(buf)) == NULL)
continue;
cp = buf;
}
@@ -248,7 +248,7 @@ install(src, dest, destdir, opts)
return;
}
- rname = exptilde(target, src);
+ rname = exptilde(target, src, sizeof(target));
if (rname == NULL)
return;
tp = target;