/[smeserver]/rpms/sudo/sme9/sudo-1.8.6p3-auditeditor.patch
ViewVC logotype

Annotation of /rpms/sudo/sme9/sudo-1.8.6p3-auditeditor.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Feb 4 19:44:06 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: sudo-1_8_6p3-30_el6_sme, sudo-1_8_6p3-29_el6_9, HEAD
Sudo

1 jpp 1.1 diff -up sudo-1.8.6p3/plugins/sudoers/sudoers.c.auditeditor sudo-1.8.6p3/plugins/sudoers/sudoers.c
2     --- sudo-1.8.6p3/plugins/sudoers/sudoers.c.auditeditor 2012-09-24 16:16:07.577331344 +0200
3     +++ sudo-1.8.6p3/plugins/sudoers/sudoers.c 2012-09-24 16:30:16.738174293 +0200
4     @@ -709,7 +709,24 @@ sudoers_policy_main(int argc, char * con
5     #endif /* HAVE_SELINUX */
6    
7     /* Must audit before uid change. */
8     - audit_success(NewArgv);
9     + if (ISSET(sudo_mode, MODE_EDIT)) {
10     + /*
11     + * Build a new argv, argc for the audit system
12     + * so that the editor being invoked is visible
13     + * in audit messages.
14     + */
15     + char *editor = NULL;
16     + char **editor_argv = NULL;
17     +
18     + editor = find_editor(NewArgc - 1, NewArgv + 1, &editor_argv);
19     +
20     + if (editor) {
21     + audit_success(editor_argv);
22     + efree(editor_argv);
23     + } else
24     + errorx(1, _("Can't find an editor"));
25     + } else
26     + audit_success(NewArgv);
27    
28     *command_infop = command_info;
29    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed