mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Typographical and Grammatical fixes
This commit is contained in:
parent
b4ae559c81
commit
5eba4b48cf
@ -240,7 +240,7 @@ Defaults are listed in brackets after the description.
|
|||||||
production environment.
|
production environment.
|
||||||
|
|
||||||
--enable-pie
|
--enable-pie
|
||||||
Build sudo and related programs as as a position independent
|
Build sudo and related programs as position independent
|
||||||
executables (PIE). This improves the effectiveness of address
|
executables (PIE). This improves the effectiveness of address
|
||||||
space layout randomization (ASLR) on systems that support it.
|
space layout randomization (ASLR) on systems that support it.
|
||||||
Sudo will create PIE binaries by default on Linux systems.
|
Sudo will create PIE binaries by default on Linux systems.
|
||||||
@ -1077,7 +1077,7 @@ You need to have a C compiler in order to build sudo. Since Solaris
|
|||||||
does not come with one by default this means that you either need
|
does not come with one by default this means that you either need
|
||||||
to either install the Solaris Studio compiler suite, available for
|
to either install the Solaris Studio compiler suite, available for
|
||||||
free from www.oracle.com, or install the GNU C compiler (gcc) which
|
free from www.oracle.com, or install the GNU C compiler (gcc) which
|
||||||
is can be installed via the pkg utility on Solaris 11 and higher
|
can be installed via the pkg utility on Solaris 11 and higher
|
||||||
and is distributed on the Solaris Companion CD for older Solaris
|
and is distributed on the Solaris Companion CD for older Solaris
|
||||||
releases. You can also download gcc packages from
|
releases. You can also download gcc packages from
|
||||||
https://www.opencsw.org/packages/CSWgcc4core/.
|
https://www.opencsw.org/packages/CSWgcc4core/.
|
||||||
|
@ -542,7 +542,7 @@ Notes on upgrading from an older release
|
|||||||
|
|
||||||
Defaults !env_reset
|
Defaults !env_reset
|
||||||
|
|
||||||
There have also been changes to how the "env_keep" and
|
There have also been changes to how the "env_keep" and
|
||||||
"env_check" options behave.
|
"env_check" options behave.
|
||||||
|
|
||||||
Prior to sudo 1.6.9, the TERM and PATH environment variables
|
Prior to sudo 1.6.9, the TERM and PATH environment variables
|
||||||
@ -593,7 +593,7 @@ Notes on upgrading from an older release
|
|||||||
without a password and `/bin/ls` as root with a password.
|
without a password and `/bin/ls` as root with a password.
|
||||||
|
|
||||||
As of sudo 1.6, the same line now means that millert is able
|
As of sudo 1.6, the same line now means that millert is able
|
||||||
to run run both `/usr/bin/whoami` and `/bin/ls` as user daemon
|
to run both `/usr/bin/whoami` and `/bin/ls` as user daemon
|
||||||
without a password. To expand on this, take the following
|
without a password. To expand on this, take the following
|
||||||
example:
|
example:
|
||||||
|
|
||||||
|
@ -637,7 +637,7 @@ sudo_ev_dispatch_v1(struct sudo_event_base *base)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Run main event loop.
|
* Run main event loop.
|
||||||
* Returns 0 on success, 1 if no events registered and -1 on error
|
* Returns 0 on success, 1 if no events registered and -1 on error
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sudo_ev_loop_v1(struct sudo_event_base *base, unsigned int flags)
|
sudo_ev_loop_v1(struct sudo_event_base *base, unsigned int flags)
|
||||||
|
@ -303,7 +303,7 @@ sudo_fatal_callback_deregister_v1(sudo_fatal_callback_t func)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the conversation function to use for output insteaf of the
|
* Set the conversation function to use for output instead of the
|
||||||
* standard error. If conv is NULL, switch back to standard error.
|
* standard error. If conv is NULL, switch back to standard error.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
@ -227,7 +227,7 @@ leadingclosebrace:
|
|||||||
|
|
||||||
/* NOT a properly balanced [expr] pattern, EOS terminated
|
/* NOT a properly balanced [expr] pattern, EOS terminated
|
||||||
* or ranges containing a slash in FNM_PATHNAME mode pattern
|
* or ranges containing a slash in FNM_PATHNAME mode pattern
|
||||||
* fall out to to the rewind and test '[' literal code path
|
* fall out to the rewind and test '[' literal code path
|
||||||
*/
|
*/
|
||||||
if (!**pattern || (slash && (**pattern == '/')))
|
if (!**pattern || (slash && (**pattern == '/')))
|
||||||
break;
|
break;
|
||||||
|
@ -415,8 +415,8 @@ sudo_lbuf_println(struct sudo_lbuf *lbuf, char *line, size_t len)
|
|||||||
cp = ep;
|
cp = ep;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there is more to print, reset have, incremement cp past
|
* If there is more to print, reset have, increment cp past
|
||||||
* the whitespace, and print a line continuaton char if needed.
|
* the whitespace, and print a line continuation char if needed.
|
||||||
*/
|
*/
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
have = lbuf->cols - indent;
|
have = lbuf->cols - indent;
|
||||||
|
@ -412,7 +412,7 @@ xxxprintf(char ** restrict strp, size_t strsize, int alloc, const char * restric
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the argument indexed by nextarg. If the argument table is
|
* Get the argument indexed by nextarg. If the argument table is
|
||||||
* built, use it to get the argument. If its not, get the next
|
* built, use it to get the argument. If it's not, get the next
|
||||||
* argument (and arguments must be gotten sequentially).
|
* argument (and arguments must be gotten sequentially).
|
||||||
*/
|
*/
|
||||||
#define GETARG(type) \
|
#define GETARG(type) \
|
||||||
|
@ -124,7 +124,7 @@ sudo_dso_findsym_v1(void *vhandle, const char *symbol)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that the behavior of of SUDO_DSO_NEXT and SUDO_DSO_SELF
|
* Note that the behavior of SUDO_DSO_NEXT and SUDO_DSO_SELF
|
||||||
* differs from most implementations when called from
|
* differs from most implementations when called from
|
||||||
* a shared library.
|
* a shared library.
|
||||||
*/
|
*/
|
||||||
|
@ -54,7 +54,7 @@ class SudoIOPlugin(sudo.Plugin):
|
|||||||
"""
|
"""
|
||||||
if not version.startswith("1."):
|
if not version.startswith("1."):
|
||||||
raise sudo.SudoException(
|
raise sudo.SudoException(
|
||||||
"This plugin plugin is not compatible with python plugin"
|
"This plugin is not compatible with python plugin"
|
||||||
"API version {}".format(version))
|
"API version {}".format(version))
|
||||||
|
|
||||||
# convert tuple of "key=value"s to dict
|
# convert tuple of "key=value"s to dict
|
||||||
|
@ -58,7 +58,7 @@ class SudoPolicyPlugin(sudo.Plugin):
|
|||||||
"""
|
"""
|
||||||
if not version.startswith("1."):
|
if not version.startswith("1."):
|
||||||
raise sudo.PluginError(
|
raise sudo.PluginError(
|
||||||
"This plugin plugin is not compatible with python plugin"
|
"This plugin is not compatible with python plugin"
|
||||||
"API version {}".format(version))
|
"API version {}".format(version))
|
||||||
|
|
||||||
self.user_env = sudo.options_as_dict(user_env)
|
self.user_env = sudo.options_as_dict(user_env)
|
||||||
|
@ -345,7 +345,7 @@ policy_check(int argc, char * const argv[],
|
|||||||
}
|
}
|
||||||
use_sudoedit = true;
|
use_sudoedit = true;
|
||||||
} else {
|
} else {
|
||||||
/* No changes needd to argv */
|
/* No changes needed to argv */
|
||||||
*argv_out = (char **)argv;
|
*argv_out = (char **)argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ sudo_fwtk_verify(const struct sudoers_context *ctx, struct passwd *pw,
|
|||||||
const char *prompt, sudo_auth *auth, struct sudo_conv_callback *callback)
|
const char *prompt, sudo_auth *auth, struct sudo_conv_callback *callback)
|
||||||
{
|
{
|
||||||
char *pass; /* Password from the user */
|
char *pass; /* Password from the user */
|
||||||
char buf[SUDO_CONV_REPL_MAX + 12]; /* General prupose buffer */
|
char buf[SUDO_CONV_REPL_MAX + 12]; /* General purpose buffer */
|
||||||
char resp[128]; /* Response from the server */
|
char resp[128]; /* Response from the server */
|
||||||
int error;
|
int error;
|
||||||
debug_decl(sudo_fwtk_verify, SUDOERS_DEBUG_AUTH);
|
debug_decl(sudo_fwtk_verify, SUDOERS_DEBUG_AUTH);
|
||||||
|
@ -157,15 +157,15 @@ struct sudo_defs_types sudo_defs_table[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
}, {
|
}, {
|
||||||
"rootpw", T_FLAG,
|
"rootpw", T_FLAG,
|
||||||
N_("Prompt for root's password, not the users's"),
|
N_("Prompt for root's password, not the user's"),
|
||||||
NULL,
|
NULL,
|
||||||
}, {
|
}, {
|
||||||
"runaspw", T_FLAG,
|
"runaspw", T_FLAG,
|
||||||
N_("Prompt for the runas_default user's password, not the users's"),
|
N_("Prompt for the runas_default user's password, not the user's"),
|
||||||
NULL,
|
NULL,
|
||||||
}, {
|
}, {
|
||||||
"targetpw", T_FLAG,
|
"targetpw", T_FLAG,
|
||||||
N_("Prompt for the target user's password, not the users's"),
|
N_("Prompt for the target user's password, not the user's"),
|
||||||
NULL,
|
NULL,
|
||||||
}, {
|
}, {
|
||||||
"use_loginclass", T_FLAG,
|
"use_loginclass", T_FLAG,
|
||||||
|
@ -91,13 +91,13 @@ env_editor
|
|||||||
"Visudo will honor the EDITOR environment variable"
|
"Visudo will honor the EDITOR environment variable"
|
||||||
rootpw
|
rootpw
|
||||||
T_FLAG
|
T_FLAG
|
||||||
"Prompt for root's password, not the users's"
|
"Prompt for root's password, not the user's"
|
||||||
runaspw
|
runaspw
|
||||||
T_FLAG
|
T_FLAG
|
||||||
"Prompt for the runas_default user's password, not the users's"
|
"Prompt for the runas_default user's password, not the user's"
|
||||||
targetpw
|
targetpw
|
||||||
T_FLAG
|
T_FLAG
|
||||||
"Prompt for the target user's password, not the users's"
|
"Prompt for the target user's password, not the user's"
|
||||||
use_loginclass
|
use_loginclass
|
||||||
T_FLAG
|
T_FLAG
|
||||||
"Apply defaults in the target user's login class if there is one"
|
"Apply defaults in the target user's login class if there is one"
|
||||||
|
@ -2015,7 +2015,7 @@ sudo_ldap_result_from_search(LDAP *ldap, LDAPMessage *searchresult)
|
|||||||
last = sudo_ldap_result_add_search(result, ldap, searchresult);
|
last = sudo_ldap_result_add_search(result, ldap, searchresult);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now add each entry in the search result to the array of of entries
|
* Now add each entry in the search result to the array of entries
|
||||||
* in the ldap_result object.
|
* in the ldap_result object.
|
||||||
*/
|
*/
|
||||||
LDAP_FOREACH(entry, last->ldap, last->searchresult) {
|
LDAP_FOREACH(entry, last->ldap, last->searchresult) {
|
||||||
|
@ -152,7 +152,7 @@ sudoers_lookup_pseudo(struct sudo_nss_list *snl, struct sudoers_context *ctx,
|
|||||||
runas_match = ALLOW;
|
runas_match = ALLOW;
|
||||||
} else if (date_match != DENY) {
|
} else if (date_match != DENY) {
|
||||||
/*
|
/*
|
||||||
* To list another user's prilileges, the runas
|
* To list another user's privileges, the runas
|
||||||
* user must match the list user or root.
|
* user must match the list user or root.
|
||||||
*/
|
*/
|
||||||
runas_match = runas_matches_pw(nss->parse_tree, cs,
|
runas_match = runas_matches_pw(nss->parse_tree, cs,
|
||||||
|
@ -240,7 +240,7 @@ struct cmndspec {
|
|||||||
struct member_list *runasuserlist; /* list of runas users */
|
struct member_list *runasuserlist; /* list of runas users */
|
||||||
struct member_list *runasgrouplist; /* list of runas groups */
|
struct member_list *runasgrouplist; /* list of runas groups */
|
||||||
struct member *cmnd; /* command to allow/deny */
|
struct member *cmnd; /* command to allow/deny */
|
||||||
struct cmndtag tags; /* tag specificaion */
|
struct cmndtag tags; /* tag specification */
|
||||||
int timeout; /* command timeout */
|
int timeout; /* command timeout */
|
||||||
time_t notbefore; /* time restriction */
|
time_t notbefore; /* time restriction */
|
||||||
time_t notafter; /* time restriction */
|
time_t notafter; /* time restriction */
|
||||||
|
@ -583,9 +583,9 @@ sudoers_parse_ldif(struct sudoers_parse_tree *parse_tree,
|
|||||||
debug_decl(sudoers_parse_ldif, SUDOERS_DEBUG_UTIL);
|
debug_decl(sudoers_parse_ldif, SUDOERS_DEBUG_UTIL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We cache user, group and host lists to make it eay to detect when there
|
* We cache user, group and host lists to make it easy to detect when there
|
||||||
* are identical lists (simple pointer compare). This makes it possible
|
* are identical lists (simple pointer compare). This makes it possible
|
||||||
* to merge multiplpe sudoRole objects into a single UserSpec and/or
|
* to merge multiple sudoRole objects into a single UserSpec and/or
|
||||||
* Privilege. The lists are sorted since LDAP order is arbitrary.
|
* Privilege. The lists are sorted since LDAP order is arbitrary.
|
||||||
*/
|
*/
|
||||||
usercache = rbcreate(str_list_cmp);
|
usercache = rbcreate(str_list_cmp);
|
||||||
|
@ -232,7 +232,7 @@ sudoers_policy_deserialize_info(struct sudoers_context *ctx, void *v,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (MATCHES(*cur, "prompt=")) {
|
if (MATCHES(*cur, "prompt=")) {
|
||||||
/* Allow epmpty prompt. */
|
/* Allow empty prompt. */
|
||||||
ctx->user.prompt = *cur + sizeof("prompt=") - 1;
|
ctx->user.prompt = *cur + sizeof("prompt=") - 1;
|
||||||
if (!append_default("passprompt_override", NULL, true, NULL, defaults))
|
if (!append_default("passprompt_override", NULL, true, NULL, defaults))
|
||||||
goto oom;
|
goto oom;
|
||||||
|
@ -44,7 +44,7 @@ struct cache_item {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Container structs to simpify size and offset calculations and guarantee
|
* Container structs to simplify size and offset calculations and guarantee
|
||||||
* proper alignment of struct passwd, group, gid_list and group_list.
|
* proper alignment of struct passwd, group, gid_list and group_list.
|
||||||
*/
|
*/
|
||||||
struct cache_item_pw {
|
struct cache_item_pw {
|
||||||
|
@ -54,7 +54,7 @@ static struct gid_list *runas_setgroups(const struct sudoers_context *ctx);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We keep track of the current permisstions and use a stack to restore
|
* We keep track of the current permissions and use a stack to restore
|
||||||
* the old permissions. A depth of 16 is overkill.
|
* the old permissions. A depth of 16 is overkill.
|
||||||
*/
|
*/
|
||||||
struct perm_state {
|
struct perm_state {
|
||||||
|
@ -387,7 +387,7 @@ sss_to_sudoers(struct sudoers_context *ctx, struct sudo_sss_handle *handle,
|
|||||||
*
|
*
|
||||||
* Sssd has already sorted the rules in descending order.
|
* Sssd has already sorted the rules in descending order.
|
||||||
* The conversion to a sudoers parse tree requires that entries be
|
* The conversion to a sudoers parse tree requires that entries be
|
||||||
* in *ascending* order so we we iterate from last to first.
|
* in *ascending* order so we iterate from last to first.
|
||||||
*/
|
*/
|
||||||
for (i = sss_result->num_rules; i; ) {
|
for (i = sss_result->num_rules; i; ) {
|
||||||
struct sss_sudo_rule *rule = sss_result->rules + --i;
|
struct sss_sudo_rule *rule = sss_result->rules + --i;
|
||||||
|
@ -335,7 +335,7 @@ cb_lookup(const struct sudoers_parse_tree *parse_tree,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the command, perform a sudoers lookup, ask for a password as
|
* Find the command, perform a sudoers lookup, ask for a password as
|
||||||
* needed, and perform post-lokup checks. Logs success/failure.
|
* needed, and perform post-lookup checks. Logs success/failure.
|
||||||
* This is used by the check, list and validate plugin methods.
|
* This is used by the check, list and validate plugin methods.
|
||||||
*
|
*
|
||||||
* Returns true if allowed, false if denied, -1 on error and
|
* Returns true if allowed, false if denied, -1 on error and
|
||||||
|
@ -84,7 +84,7 @@ close_fds(struct command_details *details, int errfd, int intercept_fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the execution environment immediately prior to the call to execve().
|
* Set up the execution environment immediately prior to the call to execve().
|
||||||
* Group setup is performed by policy_init_session(), called earlier.
|
* Group setup is performed by policy_init_session(), called earlier.
|
||||||
* Returns true on success and false on failure.
|
* Returns true on success and false on failure.
|
||||||
*/
|
*/
|
||||||
@ -253,7 +253,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the execution environment and execute the command.
|
* Set up the execution environment and execute the command.
|
||||||
* If SELinux is enabled, run the command via sesh, otherwise
|
* If SELinux is enabled, run the command via sesh, otherwise
|
||||||
* execute it directly.
|
* execute it directly.
|
||||||
* If the exec fails, cstat is filled in with the value of errno.
|
* If the exec fails, cstat is filled in with the value of errno.
|
||||||
|
@ -150,7 +150,7 @@ send_status(int fd, struct command_status *cstat)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for command status after receiving SIGCHLD.
|
* Wait for command status after receiving SIGCHLD.
|
||||||
* If the command was stopped, the status is send back to the parent.
|
* If the command was stopped, the status is sent back to the parent.
|
||||||
* Otherwise, cstat is filled in but not sent.
|
* Otherwise, cstat is filled in but not sent.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
@ -1797,7 +1797,7 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We can only pass the pathname to exececute via argv[0] (plugin API). */
|
/* We can only pass the pathname to execute via argv[0] (plugin API). */
|
||||||
orig_argv0 = argv[0] ? argv[0] : (char *)"";
|
orig_argv0 = argv[0] ? argv[0] : (char *)"";
|
||||||
argv[0] = pathname;
|
argv[0] = pathname;
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
|
@ -65,7 +65,7 @@ static void schedule_signal(struct exec_closure *ec, int signo);
|
|||||||
/*
|
/*
|
||||||
* Allocate a pty if /dev/tty is a tty.
|
* Allocate a pty if /dev/tty is a tty.
|
||||||
* Fills in io_fds[SFD_USERTTY], io_fds[SFD_LEADER] and io_fds[SFD_FOLLOWER].
|
* Fills in io_fds[SFD_USERTTY], io_fds[SFD_LEADER] and io_fds[SFD_FOLLOWER].
|
||||||
* Returns the dyamically allocated pty name on success, NULL on failure.
|
* Returns the dynamically allocated pty name on success, NULL on failure.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
pty_setup(struct command_details *details)
|
pty_setup(struct command_details *details)
|
||||||
@ -234,7 +234,7 @@ suspend_sudo_pty(struct exec_closure *ec, int signo)
|
|||||||
}
|
}
|
||||||
if (ec->foreground) {
|
if (ec->foreground) {
|
||||||
sudo_debug_printf(SUDO_DEBUG_INFO,
|
sudo_debug_printf(SUDO_DEBUG_INFO,
|
||||||
"%s: command received SIG%s, parent running in the foregound",
|
"%s: command received SIG%s, parent running in the foreground",
|
||||||
__func__, signame);
|
__func__, signame);
|
||||||
if (!ec->term_raw) {
|
if (!ec->term_raw) {
|
||||||
if (sudo_term_raw(io_fds[SFD_USERTTY], term_raw_flags))
|
if (sudo_term_raw(io_fds[SFD_USERTTY], term_raw_flags))
|
||||||
@ -718,7 +718,7 @@ backchannel_cb(int fd, int what, void *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle changes to the monitors's status (SIGCHLD).
|
* Handle changes to the monitor's status (SIGCHLD).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
handle_sigchld_pty(struct exec_closure *ec)
|
handle_sigchld_pty(struct exec_closure *ec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user