make exec the default for proc_run - use system.use_proc_open to use proc_open. Also prohibit delegated channels from manually invoking new_channel under the delegated account.
This commit is contained in:
parent
6759a28579
commit
baed7d339e
6
boot.php
6
boot.php
@ -1728,10 +1728,10 @@ function proc_run($cmd){
|
||||
proc_close(proc_open($cmd, array(), $foo));
|
||||
}
|
||||
else {
|
||||
if(get_config('system','proc_run_use_exec'))
|
||||
exec($cmdline . ' > /dev/null &');
|
||||
else
|
||||
if(get_config('system','use_proc_open'))
|
||||
proc_close(proc_open($cmdline ." &", array(), $foo));
|
||||
else
|
||||
exec($cmdline . ' > /dev/null &');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ function new_channel_post(&$a) {
|
||||
|
||||
$arr = $_POST;
|
||||
|
||||
if(($arr['account_id'] = get_account_id()) === false) {
|
||||
if((! $a->get_account()) || ($arr['account_id'] = get_account_id()) === false) {
|
||||
notice( t('Permission denied.') . EOL );
|
||||
return;
|
||||
}
|
||||
@ -95,7 +95,7 @@ function new_channel_post(&$a) {
|
||||
|
||||
function new_channel_content(&$a) {
|
||||
|
||||
if(! get_account_id()) {
|
||||
if(! $a->get_account()) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user