晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/self/root/usr/share/doc/audit/ |
Upload File : |
This is some background information about the Linux Auditing Framework.
LICENSE
=======
The audit daemon is released as GPL'd code. The audit daemon's libraries
libaudit.* and libauparse.* are released under LGPL so that it may be
linked with 3rd party software.
BUILDING
========
See the Install(.tmp) file.
USAGE
=====
See the man pages for audit, auditctl, audit.rules, ausearch, and aureport.
DISCUSSION
==========
Original lkml thread(s):
https://marc.info/?t=107815888100001&r=1&w=2
https://marc.info/?t=107901570800002&r=1&w=2
There is a linux audit mail list where any question whether kernel design,
setup and configuration, or usage can be discussed:
http://www.redhat.com/mailman/listinfo/linux-audit
DESIGN INFO (Very old)
=====================
The main goals were to provide system call auditing with 1) as low
overhead as possible, and 2) without duplicating functionality that is
already provided by SELinux (and/or other security infrastructures).
This framework will work "stand-alone", but is not designed to provide,
e.g., CAPP functionality without another security component in place.
There are two main parts, one that is always on (generic logging in
audit.c) and one that you can disable at boot- or run-time
(per-system-call auditing in auditsc.c). The patch includes changes to
security/selinux/avc.c as an example of how system-call auditing can be
integrated with other code that identifies auditable events.
Logging:
1) Uses a netlink socket for communication with user-space. All
messages are logged via the netlink socket if a user-space daemon
is listening. If not, the messages are logged via printk to the
syslog daemon (by default).
2) Messages can be dropped (optionally) based on message rate or
memory use (this isn't fully integrated into the selinux/avc.c
part of the patch: the avc.c code that currently does this can be
eliminated).
3) When some part of the kernel generates part of an audit record,
the partial record is sent immediately to user-space, AND the
system call "auditable" flag is automatically set for that call
-- thereby producing extra information at syscall exit (if
syscall auditing is enabled).
System-call auditing:
1) At task-creation time, an audit context is allocated and linked
off the task structure.
2) At syscall entry time, if the audit context exists, information
is filled in (syscall number, timestamp; but not arguments).
3) During the system call, calls to getname() and path_lookup() are
intercepted. These routines are called when the kernel is
actually looking up information that will be used to make the
decision about whether the syscall will succeed or fail. An
effort has been made to avoid copying the information that
getname generates, since getname is already making a
kernel-private copy of the information. [Note that storing
copies of all syscall arguments requires complexity and overhead
that arguably isn't needed. With this patch, for example, if
chroot("foo") fails because you are not root, "foo" will not
appear in the audit record because the kernel determined the
syscall cannot proceed before it ever needed to look up "foo".
This approach avoids storing user-supplied information that could
be misleading or unreliable (e.g., due to a cooperative
shared-memory attack) in favor of reporting information actually
used by the kernel.]
4) At syscall exit time, if the "auditable" flag has been set (e.g.,
because SELinux generated an avc record; or some other part of
the kernel detected an auditable event), the syscall-part of the
audit record is generated, including file names and inode numbers
(if available). Some of this information is currently
complementary to the information that selinux/avc.c generates
(e.g., file names and some inode numbers), but some is less
complete (e.g., getname doesn't return a fully-qualified path,
and this patch does not add the overhead of determining one).
[Note that the complete audit record comes to userspace in
pieces, which eliminates the need to store messages for
arbitrarily long periods inside the kernel.]
5) At task-exit time, the audit context is destroyed.
At steps 1, 2, and 4, simple filtering can be done (e.g., a database
role uid might have syscall auditing disabled for performance
reasons). The filtering is simple and could be made more complex.
However, I tried to implement as much filtering as possible without
adding significant overhead (e.g., d_path()). In general, the audit
framework should rely on some other kernel component (e.g., SELinux)
to make the majority of the decisions about what is and is not
auditable.