Add exec_background option in plugin command info and a sudoers
option to match. When set, commands are started in the background and automatically foregrounded as needed. There are issues with some ill-mannered programs (like Linux su) so this is not the default.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2012 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
* Copyright (c) 2009-2013 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -543,6 +543,13 @@ command_info_to_details(char * const info[], struct command_details *details)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
if (strncmp("exec_background=", info[i], sizeof("exec_background=") - 1) == 0) {
|
||||
if (atobool(info[i] + sizeof("exec_background=") - 1) == true)
|
||||
SET(details->flags, CD_EXEC_BG);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
SET_STRING("login_class=", login_class)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user