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

Diff for /src/usr.bin/rdist/docmd.c between version 1.11 and 1.12

version 1.11, 2002/06/12 06:07:16 version 1.12, 2003/04/05 20:31:58
Line 143 
Line 143 
          * Set IFS to avoid possible security problem with users           * Set IFS to avoid possible security problem with users
          * setting "IFS=/".           * setting "IFS=/".
          */           */
         (void) sprintf(buf, "IFS=\" \t\"; export IFS; %s -oi -t",          (void) snprintf(buf, sizeof buf, "IFS=\" \t\"; export IFS; %s -oi -t",
                        _PATH_SENDMAIL);                         _PATH_SENDMAIL);
         pf = popen(buf, "w");          pf = popen(buf, "w");
         if (pf == NULL) {          if (pf == NULL) {
Line 354 
Line 354 
         if (!IS_ON(options, DO_QUIET))          if (!IS_ON(options, DO_QUIET))
                 message(MT_VERBOSE, "updating host %s", rhost);                  message(MT_VERBOSE, "updating host %s", rhost);
   
         (void) sprintf(buf, "%.*s -S", sizeof(buf)-5, path_rdistd);          (void) snprintf(buf, sizeof buf, "%.*s -S", sizeof(buf)-5, path_rdistd);
   
         if ((rem_r = rem_w = remotecmd(rhost, locuser, ruser, buf)) < 0)          if ((rem_r = rem_w = remotecmd(rhost, locuser, ruser, buf)) < 0)
                 return(0);                  return(0);
Line 717 
Line 717 
                                 continue;                                  continue;
                         if (sc->sc_args != NULL && !inlist(sc->sc_args, name))                          if (sc->sc_args != NULL && !inlist(sc->sc_args, name))
                                 continue;                                  continue;
                         (void) sprintf(buf, "%s=%s;%s",                          (void) snprintf(buf, sizeof buf, "%s=%s;%s",
                                        E_LOCFILE, name, sc->sc_name);                                         E_LOCFILE, name, sc->sc_name);
                         message(MT_CHANGE, "special \"%s\"", buf);                          message(MT_CHANGE, "special \"%s\"", buf);
                         if (*env) {                          if (*env) {
Line 769 
Line 769 
         for (sc = sbcmds; sc != NULL; sc = sc->sc_next) {          for (sc = sbcmds; sc != NULL; sc = sc->sc_next) {
                 if (sc->sc_type == CMDSPECIAL) {                  if (sc->sc_type == CMDSPECIAL) {
                         env = (char *) xmalloc(sizeof(E_FILES) + 3);                          env = (char *) xmalloc(sizeof(E_FILES) + 3);
                         (void) sprintf(env, "%s='", E_FILES);                          (void) snprintf(env, sizeof(E_FILES) + 3, "%s='", E_FILES);
                         break;                          break;
                 }                  }
         }          }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12