version 1.11, 2002/06/12 06:07:16 |
version 1.12, 2003/04/05 20:31:58 |
|
|
* 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) { |
|
|
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); |
|
|
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) { |
|
|
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; |
} |
} |
} |
} |