[BACK]Return to client.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rdist

Diff for /src/usr.bin/rdist/client.c between version 1.13 and 1.14

version 1.13, 2001/11/19 19:02:15 version 1.14, 2003/04/05 20:31:58
Line 109 
Line 109 
         if (path && *path) {          if (path && *path) {
                 cp = strrchr(path, '/');                  cp = strrchr(path, '/');
                 if (cp == NULL)                  if (cp == NULL)
                         (void) sprintf(buff, "%s/%s", dest, path);                          (void) snprintf(buff, sizeof buff, "%s/%s", dest, path);
                 else {                  else {
                         srclen = strlen(src);                          srclen = strlen(src);
                         pathlen = strlen(path);                          pathlen = strlen(path);
Line 127 
Line 127 
                                 }                                  }
                         }                          }
                         if ((*cp != '/') && *cp)                          if ((*cp != '/') && *cp)
                                 (void) sprintf(buff, "%s/%s", dest, cp);                                  (void) snprintf(buff, sizeof buff,
                                       "%s/%s", dest, cp);
                         else                          else
                                 (void) sprintf(buff, "%s%s", dest, cp);                                  (void) snprintf(buff, sizeof buff,
                                       "%s%s", dest, cp);
                 }                  }
         } else          } else
                 strcpy(lname, dest);                  strcpy(lname, dest);
Line 690 
Line 692 
                 error("%s: readlink failed", target);                  error("%s: readlink failed", target);
                 err();                  err();
         }          }
         (void) sprintf(tbuf, "%.*s", (int) stb->st_size, lbuf);          (void) snprintf(tbuf, sizeof tbuf, "%.*s", (int) stb->st_size, lbuf);
         (void) sendcmd(C_NONE, "%s\n", tbuf);          (void) sendcmd(C_NONE, "%s\n", tbuf);
   
         if (n != stb->st_size) {          if (n != stb->st_size) {
Line 1205 
Line 1207 
                 char *cp;                  char *cp;
   
                 cp = getondistoptlist(opts);                  cp = getondistoptlist(opts);
                 (void) sprintf(buff, "%s%s%s %s %s",                  (void) snprintf(buff, sizeof buff, "%s%s%s %s %s",
                                IS_ON(opts, DO_VERIFY) ? "verify" : "install",                                 IS_ON(opts, DO_VERIFY) ? "verify" : "install",
                                (cp) ? " -o" : "", (cp) ? cp : "",                                 (cp) ? " -o" : "", (cp) ? cp : "",
                                src, dest);                                 src, dest);
Line 1264 
Line 1266 
          * hardlink info.           * hardlink info.
          */           */
         if (destdir || (src && dest && strcmp(src, dest))) {          if (destdir || (src && dest && strcmp(src, dest))) {
                 (void) strcpy(destcopy, dest);                  (void) strlcpy(destcopy, dest, sizeof destcopy);
                 Tdest = destcopy;                  Tdest = destcopy;
         }          }
   

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14