|
|
|
@ -311,15 +311,37 @@ int session_set_inbound(void)
|
|
|
|
|
struct stat st;
|
|
|
|
|
char *p_inb;
|
|
|
|
|
|
|
|
|
|
if( (p_inb = conf_string(cf_inbound_directory)) )
|
|
|
|
|
{
|
|
|
|
|
p_inb = conf_string(cf_inbound_directory);
|
|
|
|
|
if( !p_inb ) {
|
|
|
|
|
log("no inbound specified, assume current directory");
|
|
|
|
|
p_inb = "./";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( conf_boolean(cf_split_inbound) ) {
|
|
|
|
|
char buf[500];
|
|
|
|
|
if( state.node.addr.point ) {
|
|
|
|
|
sprintf( buf, "%s%d:%d/%d.%d/%s-in/",
|
|
|
|
|
p_inb,
|
|
|
|
|
state.node.addr.zone,
|
|
|
|
|
state.node.addr.net,
|
|
|
|
|
state.node.addr.node,
|
|
|
|
|
state.node.addr.point,
|
|
|
|
|
state.protected? "pwd": "unchecked" );
|
|
|
|
|
} else {
|
|
|
|
|
sprintf( buf, "%s%d:%d/%d/%s-in/",
|
|
|
|
|
p_inb,
|
|
|
|
|
state.node.addr.zone,
|
|
|
|
|
state.node.addr.net,
|
|
|
|
|
state.node.addr.node,
|
|
|
|
|
state.protected? "pwd": "unchecked" );
|
|
|
|
|
}
|
|
|
|
|
log("inbound: %s", buf);
|
|
|
|
|
state.inbound = (char*)xstrcpy(buf);
|
|
|
|
|
sprintf( buf, "/bin/mkdir -p %s -m 700", state.inbound );
|
|
|
|
|
system( buf );
|
|
|
|
|
} else {
|
|
|
|
|
state.inbound = (char*)xstrcpy(p_inb);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
log("no inbound specified, assume \"./\"");
|
|
|
|
|
state.inbound = (char*)xstrcpy("./");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
state.tinbound = (char*)xstrcpy(state.inbound);
|
|
|
|
|
state.tinbound = (char*)xstrcat(state.tinbound, "tmp/");
|
|
|
|
|