Skip to content

Commit

Permalink
Typographical and Grammatical fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
THE-Spellchecker authored and millert committed Nov 28, 2023
1 parent b4ae559 commit 5eba4b4
Show file tree
Hide file tree
Showing 27 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Defaults are listed in brackets after the description.
production environment.

--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
space layout randomization (ASLR) on systems that support it.
Sudo will create PIE binaries by default on Linux systems.
Expand Down Expand Up @@ -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
to either install the Solaris Studio compiler suite, available for
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
releases. You can also download gcc packages from
https://www.opencsw.org/packages/CSWgcc4core/.
4 changes: 2 additions & 2 deletions docs/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ Notes on upgrading from an older release

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.

Prior to sudo 1.6.9, the TERM and PATH environment variables
Expand Down Expand Up @@ -593,7 +593,7 @@ Notes on upgrading from an older release
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
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
example:

Expand Down
2 changes: 1 addition & 1 deletion lib/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ sudo_ev_dispatch_v1(struct sudo_event_base *base)

/*
* 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
sudo_ev_loop_v1(struct sudo_event_base *base, unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion lib/util/fatal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
void
Expand Down
2 changes: 1 addition & 1 deletion lib/util/fnmatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int fnmatch_ch(const char **pattern, const char **string, int flags)

/* NOT a properly balanced [expr] pattern, EOS terminated
* 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 == '/')))
break;
Expand Down
4 changes: 2 additions & 2 deletions lib/util/lbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ sudo_lbuf_println(struct sudo_lbuf *lbuf, char *line, size_t len)
cp = ep;

/*
* If there is more to print, reset have, incremement cp past
* the whitespace, and print a line continuaton char if needed.
* If there is more to print, reset have, increment cp past
* the whitespace, and print a line continuation char if needed.
*/
if (cp != NULL) {
have = lbuf->cols - indent;
Expand Down
2 changes: 1 addition & 1 deletion lib/util/snprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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).
*/
#define GETARG(type) \
Expand Down
2 changes: 1 addition & 1 deletion lib/util/sudo_dso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* a shared library.
*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/python/example_io_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, version: str,
"""
if not version.startswith("1."):
raise sudo.SudoException(
"This plugin plugin is not compatible with python plugin"
"This plugin is not compatible with python plugin"
"API version {}".format(version))

# convert tuple of "key=value"s to dict
Expand Down
2 changes: 1 addition & 1 deletion plugins/python/example_policy_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, user_env: tuple, settings: tuple,
"""
if not version.startswith("1."):
raise sudo.PluginError(
"This plugin plugin is not compatible with python plugin"
"This plugin is not compatible with python plugin"
"API version {}".format(version))

self.user_env = sudo.options_as_dict(user_env)
Expand Down
2 changes: 1 addition & 1 deletion plugins/sample/sample_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ policy_check(int argc, char * const argv[],
}
use_sudoedit = true;
} else {
/* No changes needd to argv */
/* No changes needed to argv */
*argv_out = (char **)argv;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/auth/fwtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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 */
int error;
debug_decl(sudo_fwtk_verify, SUDOERS_DEBUG_AUTH);
Expand Down
6 changes: 3 additions & 3 deletions plugins/sudoers/def_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ struct sudo_defs_types sudo_defs_table[] = {
NULL,
}, {
"rootpw", T_FLAG,
N_("Prompt for root's password, not the users's"),
N_("Prompt for root's password, not the user's"),
NULL,
}, {
"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,
}, {
"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,
}, {
"use_loginclass", T_FLAG,
Expand Down
6 changes: 3 additions & 3 deletions plugins/sudoers/def_data.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ env_editor
"Visudo will honor the EDITOR environment variable"
rootpw
T_FLAG
"Prompt for root's password, not the users's"
"Prompt for root's password, not the user's"
runaspw
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
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
T_FLAG
"Apply defaults in the target user's login class if there is one"
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ sudo_ldap_result_from_search(LDAP *ldap, LDAPMessage *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.
*/
LDAP_FOREACH(entry, last->ldap, last->searchresult) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ sudoers_lookup_pseudo(struct sudo_nss_list *snl, struct sudoers_context *ctx,
runas_match = ALLOW;
} 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.
*/
runas_match = runas_matches_pw(nss->parse_tree, cs,
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ struct cmndspec {
struct member_list *runasuserlist; /* list of runas users */
struct member_list *runasgrouplist; /* list of runas groups */
struct member *cmnd; /* command to allow/deny */
struct cmndtag tags; /* tag specificaion */
struct cmndtag tags; /* tag specification */
int timeout; /* command timeout */
time_t notbefore; /* time restriction */
time_t notafter; /* time restriction */
Expand Down
4 changes: 2 additions & 2 deletions plugins/sudoers/parse_ldif.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ sudoers_parse_ldif(struct sudoers_parse_tree *parse_tree,
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
* 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.
*/
usercache = rbcreate(str_list_cmp);
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ sudoers_policy_deserialize_info(struct sudoers_context *ctx, void *v,
continue;
}
if (MATCHES(*cur, "prompt=")) {
/* Allow epmpty prompt. */
/* Allow empty prompt. */
ctx->user.prompt = *cur + sizeof("prompt=") - 1;
if (!append_default("passprompt_override", NULL, true, NULL, defaults))
goto oom;
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/pwutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
struct cache_item_pw {
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/set_perms.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static struct gid_list *runas_setgroups(const struct sudoers_context *ctx);
#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.
*/
struct perm_state {
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/sssd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* 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; ) {
struct sss_sudo_rule *rule = sss_result->rules + --i;
Expand Down
2 changes: 1 addition & 1 deletion plugins/sudoers/sudoers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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.
*
* Returns true if allowed, false if denied, -1 on error and
Expand Down
4 changes: 2 additions & 2 deletions src/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* Returns true on success and false on failure.
*/
Expand Down Expand Up @@ -253,7 +253,7 @@ exec_setup(struct command_details *details, int intercept_fd, int errfd)
}

/*
* 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
* execute it directly.
* If the exec fails, cstat is filled in with the value of errno.
Expand Down
2 changes: 1 addition & 1 deletion src/exec_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ send_status(int fd, struct command_status *cstat)

/*
* 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.
*/
static void
Expand Down
2 changes: 1 addition & 1 deletion src/exec_ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
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 *)"";
argv[0] = pathname;
if (argc == 0) {
Expand Down
6 changes: 3 additions & 3 deletions src/exec_pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void schedule_signal(struct exec_closure *ec, int signo);
/*
* Allocate a pty if /dev/tty is a tty.
* 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 *
pty_setup(struct command_details *details)
Expand Down Expand Up @@ -234,7 +234,7 @@ suspend_sudo_pty(struct exec_closure *ec, int signo)
}
if (ec->foreground) {
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);
if (!ec->term_raw) {
if (sudo_term_raw(io_fds[SFD_USERTTY], term_raw_flags))
Expand Down Expand Up @@ -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
handle_sigchld_pty(struct exec_closure *ec)
Expand Down

0 comments on commit 5eba4b4

Please sign in to comment.