version 1.204, 2006/07/02 22:45:59 |
version 1.205, 2006/07/06 10:47:05 |
|
|
struct stat st; |
struct stat st; |
u_int len; |
u_int len; |
int success = 0; |
int success = 0; |
char *cmd, *subsys = packet_get_string(&len); |
char *prog, *cmd, *subsys = packet_get_string(&len); |
u_int i; |
u_int i; |
|
|
packet_check_eom(); |
packet_check_eom(); |
|
|
|
|
for (i = 0; i < options.num_subsystems; i++) { |
for (i = 0; i < options.num_subsystems; i++) { |
if (strcmp(subsys, options.subsystem_name[i]) == 0) { |
if (strcmp(subsys, options.subsystem_name[i]) == 0) { |
cmd = options.subsystem_command[i]; |
prog = options.subsystem_command[i]; |
if (stat(cmd, &st) < 0) { |
cmd = options.subsystem_args[i]; |
error("subsystem: cannot stat %s: %s", cmd, |
if (stat(prog, &st) < 0) { |
|
error("subsystem: cannot stat %s: %s", prog, |
strerror(errno)); |
strerror(errno)); |
break; |
break; |
} |
} |