Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11312
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Arthur200000 <arthur200126@163.com> |
| Newsgroups | gnu.bash.bug |
| Subject | RE: Feature Request re: syslog and bashhist |
| Date | Tue, 11 Aug 2015 00:21:57 +0800 (CST) |
| Lines | 18 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.8080.1439224647.904.bug-bash@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | base64 |
| X-Trace | usenet.stanford.edu 1439224647 13986 208.118.235.17 (10 Aug 2015 16:37:27 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | aixtools@gmail.com, "bug-bash@gnu.org" <bug-bash@gnu.org> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=mypUt ZyUd8vIRKCfxWXE0m0zvm3hw5mpEWi1iRQJuvs=; b=dJzPsmbdtHCRdBKSRZ3ZE 5DKHeHejiEi3CXyhLn6Hl4flL47r69AP4mrYtJJtcd3iyWtY0DlSjhep96oaOZFw UX4D6M7bZhPG73DUI8K7eAqLg4fXQuxvyARdq1IJ9MyJwuftnuWGmvNKuBKzm07R rs5Yc4Fl7hm+K6w46sQYJw= |
| X-Originating-IP | [119.81.161.99, 176.34.63.150, 10.144.1.72] |
| X-Priority | 3 |
| X-Mailer | Coremail Webmail Server Version SP_ntes V3.5 build 20150803(72677.7612) Copyright (c) 2002-2015 www.mailtech.cn 163com |
| X-CM-TRANSID | OcGowGDp2UCmz8hVFgYQAA--.10694W |
| X-CM-SenderInfo | xduwx3rusqiiisw6il2tof0z/1tbiTAZS31SIJxm8eQAAsg |
| X-Coremail-Antispam | 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.6.x |
| X-Received-From | 220.181.13.57 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11312 |
Show key headers only | View raw
You can add `-DSYSLOG_HISTORY` to your CFLAGS for building.
And for formatting, apply this patch:
--- bashhist.c 2015-08-11 00:09:38.449468800 +0800
+++ bashhist.c 2015-08-11 00:09:42.970623400 +0800
@@ -713,12 +713,12 @@
char trunc[SYSLOG_MAXLEN];
if (strlen(line) < SYSLOG_MAXLEN)
- syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d %s", getpid(), current_user.uid, line);
+ syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "bash[%d]: UID=%d %s", getpid(), current_user.uid, line);
else
{
strncpy (trunc, line, SYSLOG_MAXLEN);
trunc[SYSLOG_MAXLEN - 1] = '\0';
- syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY (TRUNCATED): PID=%d UID=%d %s", getpid(), current_user.uid, trunc);
+ syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "bash[%d] (TRUNCATED): UID=%d %s", getpid(), current_user.uid, trunc);
}
}
#endif
I'm not quite familiar with those configure.ac magic, and therefore I can't write some AC_ARG_ENABLE for you.
Back to gnu.bash.bug | Previous | Next | Find similar
RE: Feature Request re: syslog and bashhist Arthur200000 <arthur200126@163.com> - 2015-08-11 00:21 +0800
csiph-web