From 5eba4b48cfa2df78404a167070494d3d5a2fac81 Mon Sep 17 00:00:00 2001 From: THE-Spellchecker Date: Tue, 28 Nov 2023 01:55:57 -0500 Subject: [PATCH] Typographical and Grammatical fixes --- INSTALL.md | 4 ++-- docs/UPGRADE.md | 4 ++-- lib/util/event.c | 2 +- lib/util/fatal.c | 2 +- lib/util/fnmatch.c | 2 +- lib/util/lbuf.c | 4 ++-- lib/util/snprintf.c | 2 +- lib/util/sudo_dso.c | 2 +- plugins/python/example_io_plugin.py | 2 +- plugins/python/example_policy_plugin.py | 2 +- plugins/sample/sample_plugin.c | 2 +- plugins/sudoers/auth/fwtk.c | 2 +- plugins/sudoers/def_data.c | 6 +++--- plugins/sudoers/def_data.in | 6 +++--- plugins/sudoers/ldap.c | 2 +- plugins/sudoers/lookup.c | 2 +- plugins/sudoers/parse.h | 2 +- plugins/sudoers/parse_ldif.c | 4 ++-- plugins/sudoers/policy.c | 2 +- plugins/sudoers/pwutil.h | 2 +- plugins/sudoers/set_perms.c | 2 +- plugins/sudoers/sssd.c | 2 +- plugins/sudoers/sudoers.c | 2 +- src/exec.c | 4 ++-- src/exec_monitor.c | 2 +- src/exec_ptrace.c | 2 +- src/exec_pty.c | 6 +++--- 27 files changed, 38 insertions(+), 38 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index add976b4ac..087b2bd530 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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. @@ -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/. diff --git a/docs/UPGRADE.md b/docs/UPGRADE.md index 1e2cb5ff5f..83df1f44cc 100644 --- a/docs/UPGRADE.md +++ b/docs/UPGRADE.md @@ -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 @@ -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: diff --git a/lib/util/event.c b/lib/util/event.c index e49f657b8f..c9a6b2fa9e 100644 --- a/lib/util/event.c +++ b/lib/util/event.c @@ -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) diff --git a/lib/util/fatal.c b/lib/util/fatal.c index bdee6a1af4..f0b6e054cd 100644 --- a/lib/util/fatal.c +++ b/lib/util/fatal.c @@ -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 diff --git a/lib/util/fnmatch.c b/lib/util/fnmatch.c index 729d54612d..bd6e16aed5 100644 --- a/lib/util/fnmatch.c +++ b/lib/util/fnmatch.c @@ -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; diff --git a/lib/util/lbuf.c b/lib/util/lbuf.c index 6bc74ee940..7ac864e8a4 100644 --- a/lib/util/lbuf.c +++ b/lib/util/lbuf.c @@ -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; diff --git a/lib/util/snprintf.c b/lib/util/snprintf.c index 64765da8e4..0d574d3740 100644 --- a/lib/util/snprintf.c +++ b/lib/util/snprintf.c @@ -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) \ diff --git a/lib/util/sudo_dso.c b/lib/util/sudo_dso.c index 0124b20f9a..5390523bce 100644 --- a/lib/util/sudo_dso.c +++ b/lib/util/sudo_dso.c @@ -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. */ diff --git a/plugins/python/example_io_plugin.py b/plugins/python/example_io_plugin.py index dc4c6a7623..8a3412ac7f 100644 --- a/plugins/python/example_io_plugin.py +++ b/plugins/python/example_io_plugin.py @@ -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 diff --git a/plugins/python/example_policy_plugin.py b/plugins/python/example_policy_plugin.py index dfb15ca440..e226c46712 100644 --- a/plugins/python/example_policy_plugin.py +++ b/plugins/python/example_policy_plugin.py @@ -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) diff --git a/plugins/sample/sample_plugin.c b/plugins/sample/sample_plugin.c index a52920819d..143ed13097 100644 --- a/plugins/sample/sample_plugin.c +++ b/plugins/sample/sample_plugin.c @@ -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; } diff --git a/plugins/sudoers/auth/fwtk.c b/plugins/sudoers/auth/fwtk.c index ae62c97b21..7d689a7647 100644 --- a/plugins/sudoers/auth/fwtk.c +++ b/plugins/sudoers/auth/fwtk.c @@ -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); diff --git a/plugins/sudoers/def_data.c b/plugins/sudoers/def_data.c index 7640d12bc8..006c912166 100644 --- a/plugins/sudoers/def_data.c +++ b/plugins/sudoers/def_data.c @@ -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, diff --git a/plugins/sudoers/def_data.in b/plugins/sudoers/def_data.in index 4d627e64b6..0d70967505 100644 --- a/plugins/sudoers/def_data.in +++ b/plugins/sudoers/def_data.in @@ -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" diff --git a/plugins/sudoers/ldap.c b/plugins/sudoers/ldap.c index 08ed3ec21d..b4df111ae3 100644 --- a/plugins/sudoers/ldap.c +++ b/plugins/sudoers/ldap.c @@ -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) { diff --git a/plugins/sudoers/lookup.c b/plugins/sudoers/lookup.c index fa537970cc..efbb8451eb 100644 --- a/plugins/sudoers/lookup.c +++ b/plugins/sudoers/lookup.c @@ -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, diff --git a/plugins/sudoers/parse.h b/plugins/sudoers/parse.h index d14bdcb763..c7d9b57e67 100644 --- a/plugins/sudoers/parse.h +++ b/plugins/sudoers/parse.h @@ -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 */ diff --git a/plugins/sudoers/parse_ldif.c b/plugins/sudoers/parse_ldif.c index 180e7da6ca..ceab19b9d4 100644 --- a/plugins/sudoers/parse_ldif.c +++ b/plugins/sudoers/parse_ldif.c @@ -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); diff --git a/plugins/sudoers/policy.c b/plugins/sudoers/policy.c index 65f904ba2c..a08a6e6fdc 100644 --- a/plugins/sudoers/policy.c +++ b/plugins/sudoers/policy.c @@ -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; diff --git a/plugins/sudoers/pwutil.h b/plugins/sudoers/pwutil.h index ac80580ed9..14ab029882 100644 --- a/plugins/sudoers/pwutil.h +++ b/plugins/sudoers/pwutil.h @@ -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 { diff --git a/plugins/sudoers/set_perms.c b/plugins/sudoers/set_perms.c index 9f80094579..121b2bb379 100644 --- a/plugins/sudoers/set_perms.c +++ b/plugins/sudoers/set_perms.c @@ -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 { diff --git a/plugins/sudoers/sssd.c b/plugins/sudoers/sssd.c index c0804cb84b..d9733d0a25 100644 --- a/plugins/sudoers/sssd.c +++ b/plugins/sudoers/sssd.c @@ -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; diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 6778e4e5fe..8e7f6a3844 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -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 diff --git a/src/exec.c b/src/exec.c index 46fc8bc412..2020babf01 100644 --- a/src/exec.c +++ b/src/exec.c @@ -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. */ @@ -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. diff --git a/src/exec_monitor.c b/src/exec_monitor.c index 9681e56d06..05f5f8cd12 100644 --- a/src/exec_monitor.c +++ b/src/exec_monitor.c @@ -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 diff --git a/src/exec_ptrace.c b/src/exec_ptrace.c index b8a07892fc..9dd36c2755 100644 --- a/src/exec_ptrace.c +++ b/src/exec_ptrace.c @@ -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) { diff --git a/src/exec_pty.c b/src/exec_pty.c index 1b4bc0e5c4..e379149a86 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -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) @@ -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)) @@ -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)