/
githubmirror
/
sudo
ОбзорДокументацияВойти
/
githubmirror
/
sudo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
sudo/
plugins/sudoers/
..
auth

Merge pull request #200 from BornThisWay/fix_mem_leak_converse

4 года назад
po

Add compiled version of the sudoers Georgian translation.

3 года назад
regress

Test non-fully qualified path name.

3 года назад
Makefile.in

Fix removal of y.tab.[ch] when generating gram.[ch].

3 года назад
alias.c

Add reference counting to Defaults bindings. Previously, we checked that the previous entry's binding pointer was not the same while freeing. However, to be able to merge Defaults records we cannot rely on Defaults entries with the same binding being immediately adjacent. This removes the prev_binding checks in favor of a reference count which allows us to plug the memory leak in cvtsudoers when merging Defaults.

5 лет назад
audit.c

Split log_{input,output} into log_{stdin,ttyin} and log_{ttyout,stdout,stderr} If log_input is set, log_{stdin,ttyin} will be set as well. If log_output is set, log_{stdout,stderr,ttyout} will be set as well. This provides more fine-grained control over I/O logging and makes it possible to disable logging piped or redirected intput or output.

4 года назад
b64_decode.c

Split base64 encode/decode functions into separate source files. They are independent functions.

5 лет назад
b64_encode.c

Split base64 encode/decode functions into separate source files. They are independent functions.

5 лет назад
boottime.c

Add an explicit check for sys/sysctl.h. This test needs to be done after AC_LANG_WERROR to avoid including sys/sysctl.h on systems where it is marked as deprecated via a #warning directive.

5 лет назад
bsm_audit.c

Fix some warnings from pvs-studio

6 лет назад
bsm_audit.h

Defer logging of the successful command until approval plugins have run. This adds audit plugin support to the sudoers module, currently only used for accept events. As a result, the sudoers file is now initially parsed as an audit plugin.

6 лет назад
check.c

Add a reminder to the default lecture that the password will not echo. This line is only displayed when the pwfeedback option is disabled. GitHub issue #195.

4 года назад
check.h

Display the lecture immediately before prompting for a password. This means we no longer display the lecture unless the user is going to enter a password. Authentication methods that don't interact with the user via the terminal don't trigger the lecture.

4 года назад
check_aliases.c

Move gcc-style __attribute__ macros to config.h.in Renamed __malloc -> sudo_malloclike, __printflike -> sudo_printflike, __printf0like -> sudo_printf0like. Add sudo_noreturn instead of __attribute__((__noreturn__)). We do not use stdnoreturn.h since it has been deprecated in C23 in favor of the [[noreturn]] attribute.

4 года назад
cvtsudoers.c

Suppress PVS Studio watning about reassigning a variable the same value. Working around the warning would result in more fragile code.

4 года назад
cvtsudoers.h

Move gcc-style __attribute__ macros to config.h.in Renamed __malloc -> sudo_malloclike, __printflike -> sudo_printflike, __printf0like -> sudo_printf0like. Add sudo_noreturn instead of __attribute__((__noreturn__)). We do not use stdnoreturn.h since it has been deprecated in C23 in favor of the [[noreturn]] attribute.

4 года назад
cvtsudoers_csv.c

Fix a few whitespace issues.

4 года назад
cvtsudoers_json.c

Add basic regress for JSON functions. Fix a bug in escaped control character handling. Roll back changes to buffer if sudo_json_add_value() fails.

4 года назад
cvtsudoers_ldif.c

Fix a few whitespace issues.

4 года назад
cvtsudoers_merge.c

Eliminate a few harmless dead stores. Quiets warnings from Infer.

4 года назад
cvtsudoers_pwutil.c

Make sudo pass -Wwrite-strings

4 года назад
def_data.c

Update the description of intercept_verify

4 года назад
def_data.h

Split log_{input,output} into log_{stdin,ttyin} and log_{ttyout,stdout,stderr} If log_input is set, log_{stdin,ttyin} will be set as well. If log_output is set, log_{stdout,stderr,ttyout} will be set as well. This provides more fine-grained control over I/O logging and makes it possible to disable logging piped or redirected intput or output.

4 года назад
def_data.in

Update the description of intercept_verify

4 года назад
defaults.c

Move gcc-style __attribute__ macros to config.h.in Renamed __malloc -> sudo_malloclike, __printflike -> sudo_printflike, __printf0like -> sudo_printf0like. Add sudo_noreturn instead of __attribute__((__noreturn__)). We do not use stdnoreturn.h since it has been deprecated in C23 in favor of the [[noreturn]] attribute.

4 года назад
defaults.h

Split log_{input,output} into log_{stdin,ttyin} and log_{ttyout,stdout,stderr} If log_input is set, log_{stdin,ttyin} will be set as well. If log_output is set, log_{stdout,stderr,ttyout} will be set as well. This provides more fine-grained control over I/O logging and makes it possible to disable logging piped or redirected intput or output.

4 года назад
digestname.c

We no longer need to include headers we don't use for sudo*.h files. Previously we needed to include headers required by the various sudo*h files. Now those files are more self-sufficient and we should only include headers needed by code in the various .c files.

6 лет назад
editor.c

Restore the line that set errno to ENOENT when find_path() fails. This was inadvertently removed when the "goto bad" was added.

4 года назад
env.c

env_file_next_local: change the order of the val_len check. It makes more sense to verify that val_len > 1 before using it. This is not a problem in practice because val[val_len - 1] is guaranteed not to underflow but it can confuse reviewers and static analyzers.

4 года назад
env_pattern.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
exptilde.c

Make sudo pass -Wwrite-strings

4 года назад
file.c

Add a hook for sudoers parse errors (including defaults and aliases). The hook can be used to log parser errors (sudoers module) or keep track of which files have an error (visudo). Previously, we only kept track of a single parse error.

4 года назад
filedigest.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
find_path.c

Add some debugging info to find_path()

5 лет назад
fmtsudoers.c

Fix printing of MYSELF when listing another user's privileges. We need to use list_pw if it is set instead of user_name. GitHub issue #183

4 года назад
fmtsudoers_cvt.c

Add reference counting to Defaults bindings. Previously, we checked that the previous entry's binding pointer was not the same while freeing. However, to be able to merge Defaults records we cannot rely on Defaults entries with the same binding being immediately adjacent. This removes the prev_binding checks in favor of a reference count which allows us to plug the memory leak in cvtsudoers when merging Defaults.

5 лет назад
gc.c

Add garbage collection to resolve_editor(). Fixes a leak when evaluating the policy multiple times if sudoedit is set.

5 лет назад
gentime.c

parse_gentime: use timegm() to generate time since the epoch The timegm() function is non-standard but widely available. Provide an implementation for those systems that lack it. Bug #1006

5 лет назад
getdate.c

Remove cast from time_t to int to avoid a Coverity false positive. The cast should not be required.

4 года назад
getdate.y

Remove cast from time_t to int to avoid a Coverity false positive. The cast should not be required.

4 года назад
getspwuid.c

Close the passwd db before calling getpwnam_shadow(3). Otherwise, we will get the non-shadow passwd entry ("*") since we called setpassent(3) earlier to keep the passwd db open.

6 лет назад
goodpath.c

Suppress PVS Studio false positives.

6 лет назад
gram.c

Move handling of the "list" pseudo-command from lexer to parser. The special handling of "list" in the lexer meant it could not be used as a user, group or host, which was unintentional. GitHub issue #246.

3 года назад
gram.h

Recover from missing include file unless error_recovery is disabled. It is still treated as an error from a logging perspective, and mail is still sent.

4 года назад
gram.y

Move handling of the "list" pseudo-command from lexer to parser. The special handling of "list" in the lexer meant it could not be used as a user, group or host, which was unintentional. GitHub issue #246.

3 года назад
group_plugin.c

Remove the owner and mode checks when loading a sudo plugin. The sudo.conf file is considered a trusted source of information and these checks suffer from TOCTOU issues anyway. The checks complicate loading of shared objects since we need to perform fallback processing twice.

4 года назад
ins_2001.h

Add SPDX-License-Identifier to files.

7 лет назад
ins_classic.h

Add SPDX-License-Identifier to files.

7 лет назад
ins_csops.h

Add SPDX-License-Identifier to files.

7 лет назад
ins_goons.h

Add SPDX-License-Identifier to files.

7 лет назад
ins_python.h

Add SPDX-License-Identifier to files.

7 лет назад
insults.h

Make sudo pass -Wwrite-strings

4 года назад
interfaces.c

Move definition of INADDR_NONE from interfaces.c to net_ifs.c. Fixes compilation on Solaris 9.

5 лет назад
interfaces.h

Add SPDX-License-Identifier to files.

7 лет назад
iolog.c

Eliminate a few harmless dead stores. Quiets warnings from Infer.

4 года назад
iolog_path_escapes.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
ldap.c

Eliminate a few harmless dead stores. Quiets warnings from Infer.

4 года назад
ldap_conf.c

Eliminate a few harmless dead stores. Quiets warnings from Infer.

4 года назад
ldap_util.c

sudo_ldap_parse_option: add explicit NULL check for strchr(). This should not be needed since we only use the returned pointer if it is larger than the string passed to strchr(). Quiets a warning from Infer.

4 года назад
linux_audit.c

Check the return value of fcntl() when setting FD_CLOEXEC. This should never fail unless the fd is invalid. Problem reported by Matthias Gerstner of SUSE.

6 лет назад
linux_audit.h

Add missing const to linux_audit_command()'s argv function argument.

6 лет назад
locale.c

Pass file, line and column to sudoers defaults callbacks.

4 года назад
log_client.c

Protect use of AF_INET6 with HAVE_STRUCT_IN6_ADDR guards. From Tim Rice.

4 года назад
log_client.h

Save a pointer to the event_alloc parameter in the plugin open function. That way we don't need to pass event_alloc around to the log client functions.

4 года назад
logging.c

Fix "sudo -l command args", broken in sudo 1.9.13. The value of user_args should not contain the command to be run in "sudo -l command args", only the arguments of the command being checked. This restores the pre-1.9.13 behavior. GitHub issue #249

3 года назад
logging.h

Move gcc-style __attribute__ macros to config.h.in Renamed __malloc -> sudo_malloclike, __printflike -> sudo_printflike, __printf0like -> sudo_printf0like. Add sudo_noreturn instead of __attribute__((__noreturn__)). We do not use stdnoreturn.h since it has been deprecated in C23 in favor of the [[noreturn]] attribute.

4 года назад
match.c

A user with "list" privs for root may not list all users. A user with "sudo ALL" for root _is_ allowed to list any user.

3 года назад
match_addr.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
match_command.c

Fix potential double free for rules that include a CHROOT= option. If a rule with a CHROOT= option matches the user, host and runas, the user_cmnd variable could be freed twice.

3 года назад
match_digest.c

Move hexchar() from the sudoers plugin to lib/util.

4 года назад
mkdefaults

Add basic support for setting resource limits in sudoers. The default for rlimit_core is "0,0" Resource limits are passed back to the front-end in command_info[] when set.

5 лет назад
parse.c

A user with "list" privs for root may not list all users. A user with "sudo ALL" for root _is_ allowed to list any user.

3 года назад
parse.h

A user with "list" privs for root may not list all users. A user with "sudo ALL" for root _is_ allowed to list any user.

3 года назад
parse_ldif.c

Fix a potential use-after-free bug with cvtsudoers filtering. In role_to_sudoers() when merging a privilege to the previous one where the runas lists are the same we need to re-use the runas lists of the last command in the previous privilege, not the first. Otherwise, the check in free_cmndspec() will not notice the re-used runas lists. Reported/analyzed by Sohom Datta. GitHub issue #198.

4 года назад
policy.c

sudoers_policy_list: do not set runas_pw to list_pw when listing This change introduced in sudo 1.9.13 is not actually needed. The "list" pseudo-command checks are performed via runas_matches_pw() which does not use runas_pw. GitHub issue #248

3 года назад
prompt.c

expand_prompt: use correct strlcpy() size parameter The available size passed to strlcpy() was computed incorrectly. Switch to updating the length after writing to the new prompt instead of computing it each time. The actual buffer size is computed and allocated correctly so there is no real consequence to this bug. Found by Qualys.

5 лет назад
pwutil.c

sudo_debug_group_list: short-circuit if groups is NULL

4 года назад
pwutil.h

Apply spelling fixes. Fixes from PR #30 (ka7) and Bug #925 (fossies.org codespell)

6 лет назад
pwutil_impl.c

Fix CodeQL "Multiplication result converted to larger type" warnings.

5 лет назад
redblack.c

Suppress PVS Studio false positives.

6 лет назад
redblack.h

Add SPDX-License-Identifier to files.

7 лет назад
serialize_list.c

Escape/unescape commas when serializing/deserializing a stringlist.

5 лет назад
set_perms.c

Allow set_perms(PERM_INITIAL) to be called more than once. If the perm stack depth is non-zero when set_perms(PERM_INITIAL) is called, rewind it first and re-initialize the stack depth to 0. Fixes a user-after-free bug if set_perms(PERM_INITIAL) is called multiple times.

5 лет назад
solaris_audit.c

Fix Solaris and BSM audit warnings. Use BSM audit on Illumos, which lacks Solaris audit.

6 лет назад
solaris_audit.h

Defer logging of the successful command until approval plugins have run. This adds audit plugin support to the sudoers module, currently only used for accept events. As a result, the sudoers file is now initially parsed as an audit plugin.

6 лет назад
sssd.c

Add a source to struct sudo_nss and use it if getdefs() fails. Also remove useless "Problem with defaults entries" warning in testsudoers.

4 года назад
starttime.c

Add support for the struct kinfo_proc on Dragonfly BSD.

4 года назад
strlcpy_unesc.c

Mark code that escapes/unescapes "sudo -s cmd args..." for removal. A future version of the plugin API will defer any such escaping to the policy plugin so it can be configurable.

4 года назад
strlist.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
strlist.h

Add SPDX-License-Identifier to files.

7 лет назад
strvec_join.c

Eliminate a few harmless dead stores. Quiets warnings from Infer.

4 года назад
stubs.c

Make sudo pass -Wmissing-prototypes

4 года назад
sudo_ldap.h

Make it possible to call the sudoers policy check function multiple times. We need to reset the Defaults values to their original state.

5 лет назад
sudo_ldap_conf.h

Sudo parsed "deref" and "tls_reqcert" in ldap.conf but didn't set the options. The switch() in the sudo_ldap_set_options_table() function needed to be updated to treat CONF_DEREF_VAL and CONF_REQCERT_VAL data types as int. Fix from Dennis Filder. Bug #1013.

5 лет назад
sudo_nss.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
sudo_nss.h

Add a source to struct sudo_nss and use it if getdefs() fails. Also remove useless "Problem with defaults entries" warning in testsudoers.

4 года назад
sudo_printf.c

Use the fallthrough attribute instead of /* FALLTHROUGH */ comments.

6 лет назад
sudoers.c

Fix "sudo -l command args", broken in sudo 1.9.13. The value of user_args should not contain the command to be run in "sudo -l command args", only the arguments of the command being checked. This restores the pre-1.9.13 behavior. GitHub issue #249

3 года назад
sudoers.exp

Export sudoers_audit symbol for compilers without symbol visibility.

6 лет назад
sudoers.h

Pass back the number of files to edit when using sudoedit. The sudo front-end can use this to determine where the list of files to edit begins.

4 года назад
sudoers.in

Fix typo in sudoers comment

4 года назад
sudoers_debug.c

sudo_debug_register: add minfd argument to specify lowest fd number Use this in sudo_intercept.so to avoid allocating a low-numbered fd which the shell reserves for use by scripts.

5 лет назад
sudoers_debug.h

Add SPDX-License-Identifier to files.

7 лет назад
sudoers_hooks.c

Make sudo pass -Wwrite-strings

4 года назад
sudoers_version.h

Bump SUDOERS_GRAMMAR_VERSION to 50 for the new list pseudo-command.

4 года назад
sudoreplay.c

Add eventlog_store_sudo() and use it in sudoreplay. This replaces the custom log formatting used by "sudoreplay -l".

4 года назад
testsudoers.c

Fix potential double free for rules that include a CHROOT= option. If a rule with a CHROOT= option matches the user, host and runas, the user_cmnd variable could be freed twice.

3 года назад
testsudoers_pwutil.c

Do not redefine system group and passwd functions for testsudoers. Instead, prefix the replacements with "testsudoers_" and use a custom pwutil backend so they get used.

5 лет назад
timeout.c

Include string.h unconditionally and only use strings.h for strn?casecmp() In the pre-POSIX days BSD had strings.h, not string.h. Now strings.h is only used for non-ANSI string functions.

6 лет назад
timestamp.c

sudo_secure_open_{file,dir}: always check thatreturn value is not -1. Avoids false positives from static analyzers that can't figure out that the fd is always valid when error is SUDO_PATH_SECURE.

4 года назад
timestr.c

Make sudo pass -Wmissing-prototypes

4 года назад
toke.c

Move handling of the "list" pseudo-command from lexer to parser. The special handling of "list" in the lexer meant it could not be used as a user, group or host, which was unintentional. GitHub issue #246.

3 года назад
toke.h

Move gcc-style __attribute__ macros to config.h.in Renamed __malloc -> sudo_malloclike, __printflike -> sudo_printflike, __printf0like -> sudo_printf0like. Add sudo_noreturn instead of __attribute__((__noreturn__)). We do not use stdnoreturn.h since it has been deprecated in C23 in favor of the [[noreturn]] attribute.

4 года назад
toke.l

Move handling of the "list" pseudo-command from lexer to parser. The special handling of "list" in the lexer meant it could not be used as a user, group or host, which was unintentional. GitHub issue #246.

3 года назад
toke_util.c

Move hexchar() from the sudoers plugin to lib/util.

4 года назад
tsdump.c

Place C23 attributes before keywords in function declarations. In practice this means we must use "sudo_noreturn static foo(void)" instead of "static sudo_noreturn foo(void)".

4 года назад
tsgetgrpw.c

Eliminate a few harmless dead stores. Quiets warnings from Infer.

4 года назад
tsgetgrpw.h

Refactor code to open passwd/group file and add setpassent/setgroupent. This makes the "stayopen" semantics match the system passwd/group functions. The getpwent/getgrent functions now open the database if it is not already open.

4 года назад
unesc_str.c

Make sudo pass -Wmissing-prototypes

4 года назад
visudo.c

Fix potential double free for rules that include a CHROOT= option. If a rule with a CHROOT= option matches the user, host and runas, the user_cmnd variable could be freed twice.

3 года назад
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©