memory: build auditd as a standalone binary and run it so.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ack, but please also add:
isys/auditd
To the .gitignore file.
On Wed, 5 May 2010, Ales Kozumplik wrote:
Instead of just forking, we fork() anaconda and then execv our custom
audit daemon. This saves us an extra anaconda process running permanently,
taking memory.
+def startAuditDaemon():
+ childpid = os.fork()
+ if not childpid:
+ cmd = '/sbin/auditd'
+ try:
+ os.execl(cmd, cmd)
+ except OSError as e:
+ log.error("Error running the audit daemon: %s" % str(e))
+ sys.exit(0)
+ # auditd will turn into a daemon so catch the immediate child pid now:
+ os.waitpid(childpid, 0)
+
# function to handle X startup special issues for anaconda
def doStartupX11Actions(runres="800x600"):
global wm_pid
@@ -760,7 +772,7 @@ if __name__ == "__main__":
opts.isHeadless = True
if not flags.livecdInstall:
- isys.auditDaemon()
+ startAuditDaemon()
# setup links required for all install types
for i in ( "services", "protocols", "nsswitch.conf", "joe", "selinux",
diff --git a/isys/Makefile.am b/isys/Makefile.am
index f7c076a..415a0b5 100644
--- a/isys/Makefile.am
+++ b/isys/Makefile.am
@@ -52,4 +52,10 @@ libisys_la_LDFLAGS = -static
libisys_la_LIBADD = $(ISYS_LIBS)
libisys_la_SOURCES = $(ISYS_SRCS)