[patch] a bit more info in su log
Mike Frysinger <[email protected]> Mon, 28 Aug 2006 14:50:21 -0400
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Organization | wh0rd.org |
| Message-ID | <[email protected]> |
--Boundary-00=_trz8E8d5FKwGCmc
Content-Type: multipart/signed; boundary="nextPart4946682.IM3fTuxWno";
protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
--nextPart4946682.IM3fTuxWno
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
one thing i like about sudo is that the syslog contains the actual command=
=20
string ... but running `su -` versus `su -c ls` gives you the same syslog=20
line
attached patch tweaks the log output a little to include whether the comman=
d=20
is starting a new shell or if it's running a specific command
=2Dmike
--nextPart4946682.IM3fTuxWno
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iQIVAwUARPM67UFjO5/oN/WBAQKYNRAAqShxJBMwFvZItMFtB073z+7foOkjJF2t
u8lxvDtkay+0HtsOH5UMga2JnRM1cg4NoyS34+N1mej/fusvJZLDrS84FITts8QR
VGQpxP+/CP56ci1UZo8Uz0/wWWskI6BNT86SGlbSuUJiEaqG1iqGEnaWKDrXoLu1
pFnjv9es1dseID7B6M1d01g+edJeSnCJKKq4kAQaUpNZRaYoXuActlyiCUWsLYrn
rewzy8kXdmiHLaN2y2he2mtwBn9+yaLMOLV0KKd6PXqn4NPWA3+OtF07jp/O580u
8mD8fzEhZ9GBOI32QjkHxY9QX1i936AKQC/IncwoMFK3KKP8RacT/88rITkP2Fvb
XBIwffIooYqgU4aFKcFYegtKs0LbU9OwWqbqNZCrS0sKyEL2DRyeqfSz2aqwpehB
6iPsfjEcDRH5cVBiIN460Z7AnqbnM6egYI16Nv/1KED0vlkYG9mGoCw3eRj5DHj7
tccpUTpw1SbGOo3hZ8W0BBvVg/13KlfxiVGrVxXKYOVc/cVq+NbaEj/jdul1P9v9
ngFdv9PYgDaSHJ9mRenVOOmXQBWjRqewqyvGxCODqTNWfRTZukXeWekicqoi6ubj
hIWzAW9/V+4sowAsQ6qiyWLaxnwQ3A2JvDJ5+dgaBPumG1mUnP36V71EWx9O/QcT
xZbnCxDKtkk=
=7giF
-----END PGP SIGNATURE-----
--nextPart4946682.IM3fTuxWno--
--Boundary-00=_trz8E8d5FKwGCmc
Content-Type: text/x-diff; charset="us-ascii"; name="shadow-su-logging.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="shadow-su-logging.patch"
--- src/su.c
+++ src/su.c
@@ -731,8 +731,9 @@ int main (int argc, char **argv)
endspent ();
#ifdef USE_SYSLOG
if (getdef_bool ("SYSLOG_SU_ENAB"))
- SYSLOG ((LOG_INFO, "+ %s %s:%s", tty,
- oldname[0] ? oldname : "???", name[0] ? name : "???"));
+ SYSLOG ((LOG_INFO, "+ %s %s:%s (%s)", tty,
+ oldname[0] ? oldname : "???", name[0] ? name : "???",
+ doshell ? "new shell" : command));
#endif
#ifdef USE_PAM
--Boundary-00=_trz8E8d5FKwGCmc
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline