-1.8.0a1 March 17, 2010 1
+1.8.0a1 March 19, 2010 1
-1.8.0a1 March 17, 2010 2
+1.8.0a1 March 19, 2010 2
-1.8.0a1 March 17, 2010 3
+1.8.0a1 March 19, 2010 3
Authentication type, if specified by the -a flag, to use on
systems where BSD authentication is supported.
+ progname=string
+ The command name that sudo was run as, typically "sudo" or
+ "sudoedit".
+
Additional settings may be added in the future so the plugin
should silently ignore settings that it does not recognize.
is no terminal device available, a default value of 24 is
used.
- cols=int
- The number of columns the user's terminal supports. If
- there is no terminal device available, a default value of
- 80 is used.
-1.8.0a1 March 17, 2010 4
+1.8.0a1 March 19, 2010 4
SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ cols=int
+ The number of columns the user's terminal supports. If
+ there is no terminal device available, a default value of
+ 80 is used.
+
user_env
The user's environment in the form of a NULL-terminated vector
of "name=value" strings.
SUDO_CONF_ERROR_MSG to present additional error information to the
user.
- The function arguments are as follows:
-
- argc
- The number of elements in _\ba_\br_\bg_\bv, not counting the final NULL
- pointer.
-1.8.0a1 March 17, 2010 5
+1.8.0a1 March 19, 2010 5
SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ The function arguments are as follows:
+
+ argc
+ The number of elements in _\ba_\br_\bg_\bv, not counting the final NULL
+ pointer.
+
argv
The argument vector describing the command the user wishes to
run, in the same form as what would be passed to the _\be_\bx_\be_\bc_\bv_\be_\b(_\b)
login_class=login_class
BSD login class to use when setting resource limits and
- nice value (optional). This option is only set on systems
- that support login classes.
- preserve_groups=bool
- If set, s\bsu\bud\bdo\bo will preserve the user's group vector instead
- of initializing the group vector based on runas_user.
-
-1.8.0a1 March 17, 2010 6
+1.8.0a1 March 19, 2010 6
SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ nice value (optional). This option is only set on systems
+ that support login classes.
+
+ preserve_groups=bool
+ If set, s\bsu\bud\bdo\bo will preserve the user's group vector instead
+ of initializing the group vector based on runas_user.
+
cwd=string
The current working directory to change to when executing
the command.
List available privileges for the invoking user. Returns 1 on
success, 0 on failure and -1 on error. On error, the plugin may
optionally call the conversation function with SUDO_CONF_ERROR_MSG
- to present additional error information to the user.
- Privileges should be output via the conversation function using
- SUDO_CONV_INFO_MSG.
- verbose
- Flag indicating whether to list in verbose mode or not.
+1.8.0a1 March 19, 2010 7
-1.8.0a1 March 17, 2010 7
+SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
-SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ to present additional error information to the user.
+
+ Privileges should be output via the conversation function using
+ SUDO_CONV_INFO_MSG.
+ verbose
+ Flag indicating whether to list in verbose mode or not.
list_user
The name of a different user to list privileges for if the
_\bC_\bo_\bn_\bv_\be_\br_\bs_\ba_\bt_\bi_\bo_\bn _\bA_\bP_\bI
- If the plugin needs to interact with the user or display informational
- or error messages, it may do so via the conversation function. A
- plugin should not attempt to read directly from the standard input or
- the user's tty (neither of which are guaranteed to exist). The caller
- must include a trailing newline in msg if they want one to be printed.
-
-
-
-1.8.0a1 March 17, 2010 8
+1.8.0a1 March 19, 2010 8
SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ If the plugin needs to interact with the user or display informational
+ or error messages, it may do so via the conversation function. A
+ plugin should not attempt to read directly from the standard input or
+ the user's tty (neither of which are guaranteed to exist). The caller
+ must include a trailing newline in msg if they want one to be printed.
+
struct sudo_conv_message {
#define SUDO_CONV_PROMPT_ECHO_OFF 1
#define SUDO_CONV_PROMPT_ECHO_ON 2
disabled, such as passwords). The log_output function receives output
from the pseudo-tty that is suitable for replaying the user's session
at a later time. Either log_input or log_output may be NULL. If the
- open function returns 0, no I/O will be sent to the plugin.
- The io_plugin struct has the following fields:
- type
- The type field should always be set to SUDO_IO_PLUGIN
+1.8.0a1 March 19, 2010 9
-1.8.0a1 March 17, 2010 9
+SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
-SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ open function returns 0, no I/O will be sent to the plugin.
+
+ The io_plugin struct has the following fields:
+ type
+ The type field should always be set to SUDO_IO_PLUGIN
version
The version field should be set to SUDO_API_VERSION.
the form of "name=value" strings. The vector is terminated by
a NULL pointer.
- When parsing _\bu_\bs_\be_\br_\b__\bi_\bn_\bf_\bo, the plugin should split on the f\bfi\bir\brs\bst\bt
- equal sign ('=') since the _\bn_\ba_\bm_\be field will never include one
- itself but the _\bv_\ba_\bl_\bu_\be might.
- See the "Policy Plugin API" section for a list of all possible
- strings.
+1.8.0a1 March 19, 2010 10
-1.8.0a1 March 17, 2010 10
+SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
-SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ When parsing _\bu_\bs_\be_\br_\b__\bi_\bn_\bf_\bo, the plugin should split on the f\bfi\bir\brs\bst\bt
+ equal sign ('=') since the _\bn_\ba_\bm_\be field will never include one
+ itself but the _\bv_\ba_\bl_\bu_\be might.
+ See the "Policy Plugin API" section for a list of all possible
+ strings.
user_env
The user's environment in the form of a NULL-terminated vector
The function arguments are as follows:
- buf The buffer containing user input.
- len The length of _\bb_\bu_\bf in bytes.
- log_output
- int (*log_output)(const char *buf, unsigned int len);
+1.8.0a1 March 19, 2010 11
-1.8.0a1 March 17, 2010 11
+SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ buf The buffer containing user input.
-SUDO_PLUGIN(1m) MAINTENANCE COMMANDS SUDO_PLUGIN(1m)
+ len The length of _\bb_\bu_\bf in bytes.
+ log_output
+ int (*log_output)(const char *buf, unsigned int len);
The _\bl_\bo_\bg_\b__\bo_\bu_\bt_\bp_\bu_\bt function is called whenever data can be read from
the command but before it is written to the user's terminal. This
-
-
-
-
-
-
-
-1.8.0a1 March 17, 2010 12
+1.8.0a1 March 19, 2010 12