[sudo-workers] A Patch for mailsub with command and arguments

Martin Cuellar mcuellar at bch.hn
Wed Apr 27 18:28:28 EDT 2005


I need the mail subject with the command and arguments, for a fast read.

[root at bch:/desarrollo/sysadmin/amps/sudo-1.6.8p8]# diff -u
logging.c.original logging.c
--- logging.c.original  Mon May 17 14:08:46 2004
+++ logging.c   Wed Apr 27 16:38:13 2005
@@ -526,6 +526,17 @@
                case 'u':
                    (void) fputs(user_name, mail);
                    break;
+                /* Patched by Martin Cuellar
+                   Example: mailsub="SUDO:root<=%u@%h %C %A" */
+                case 'C':
+                    (void) fputs(user_cmnd, mail);
+                    break;
+                case 'A':
+                    if (user_args) {
+                      (void) fputs(user_args, mail);
+                    }
+                    break;
+                /* end patch */
                default:
                    p--;
                    break;

I am waiting for your comments.

Regards.

-- 
Martin Cuellar, Área de Operaciones, Depto. Informática y Tecnología
Banco Central de Honduras, (504)237-2270 al 79 ext. 2721
Open-source executable:  $0.00.  Source:  $0.00  Control:  priceless!
no back doors, no license fees, no security through obscurity, no virus,
no b...




More information about the sudo-workers mailing list