=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdist/client.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/rdist/client.c 2014/07/12 03:48:04 1.31 --- src/usr.bin/rdist/client.c 2015/01/16 06:40:11 1.32 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.31 2014/07/12 03:48:04 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.32 2015/01/16 06:40:11 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. *************** *** 347,355 **** static int sendhardlink(opt_t opts, struct linkbuf *lp, char *rname, int destdir) { ! static char buff[MAXPATHLEN]; char *lname; /* name of file to link to */ ! char ername[MAXPATHLEN*4], elname[MAXPATHLEN*4]; debugmsg(DM_MISC, "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n", --- 347,355 ---- static int sendhardlink(opt_t opts, struct linkbuf *lp, char *rname, int destdir) { ! static char buff[PATH_MAX]; char *lname; /* name of file to link to */ ! char ername[PATH_MAX*4], elname[PATH_MAX*4]; debugmsg(DM_MISC, "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n", *************** *** 382,388 **** { int goterr, f; off_t i; ! char ername[MAXPATHLEN*4]; if (stb->st_nlink > 1) { struct linkbuf *lp; --- 382,388 ---- { int goterr, f; off_t i; ! char ername[PATH_MAX*4]; if (stb->st_nlink > 1) { struct linkbuf *lp; *************** *** 492,498 **** struct stat stb; int didupdate = 0; int n; ! char targ[MAXPATHLEN*4]; debugmsg(DM_CALL, "rmchk()\n"); --- 492,498 ---- struct stat stb; int didupdate = 0; int n; ! char targ[PATH_MAX*4]; debugmsg(DM_CALL, "rmchk()\n"); *************** *** 584,590 **** char *optarget, *cp; int len; int didupdate = 0; ! char ername[MAXPATHLEN*4]; /* * Send recvdir command in recvit() format. --- 584,590 ---- char *optarget, *cp; int len; int didupdate = 0; ! char ername[PATH_MAX*4]; /* * Send recvdir command in recvit() format. *************** *** 620,626 **** if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; ! if (len + 1 + (int) strlen(dp->d_name) >= MAXPATHLEN - 1) { error("%s/%s: Name too long", target, dp->d_name); continue; --- 620,626 ---- if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; ! if (len + 1 + (int) strlen(dp->d_name) >= PATH_MAX - 1) { error("%s/%s: Name too long", target, dp->d_name); continue; *************** *** 656,664 **** { int f, n; static char tbuf[BUFSIZ]; ! char lbuf[MAXPATHLEN]; u_char *s; ! char ername[MAXPATHLEN*4]; debugmsg(DM_CALL, "sendlink(%s, %lx, stb, %d)\n", rname, opts, destdir); --- 656,664 ---- { int f, n; static char tbuf[BUFSIZ]; ! char lbuf[PATH_MAX]; u_char *s; ! char ername[PATH_MAX*4]; debugmsg(DM_CALL, "sendlink(%s, %lx, stb, %d)\n", rname, opts, destdir); *************** *** 777,783 **** char *owner = NULL, *group = NULL; int done, n; u_char *cp; ! char ername[MAXPATHLEN*4]; debugmsg(DM_CALL, "update(%s, 0x%lx, %p)\n", rname, opts, statp); --- 777,783 ---- char *owner = NULL, *group = NULL; int done, n; u_char *cp; ! char ername[PATH_MAX*4]; debugmsg(DM_CALL, "update(%s, 0x%lx, %p)\n", rname, opts, statp); *************** *** 1041,1047 **** struct stat *st, char *user, char *group) { int rv = 0; ! char ername[MAXPATHLEN*4]; int lmode = st->st_mode & 07777; if (u == US_CHMOG) { --- 1041,1047 ---- struct stat *st, char *user, char *group) { int rv = 0; ! char ername[PATH_MAX*4]; int lmode = st->st_mode & 07777; if (u == US_CHMOG) { *************** *** 1214,1223 **** int install(char *src, char *dest, int ddir, int destdir, opt_t opts) { ! static char destcopy[MAXPATHLEN]; char *rname; int didupdate = 0; ! char ername[MAXPATHLEN*4]; debugmsg(DM_CALL, "install(src=%s,dest=%s,ddir=%d,destdir=%d,opts=%ld) start\n", --- 1214,1223 ---- int install(char *src, char *dest, int ddir, int destdir, opt_t opts) { ! static char destcopy[PATH_MAX]; char *rname; int didupdate = 0; ! char ername[PATH_MAX*4]; debugmsg(DM_CALL, "install(src=%s,dest=%s,ddir=%d,destdir=%d,opts=%ld) start\n",