* Added --time_interval N to add entropy unconditionally every N seconds. * Synchronize haveged instances during switch root. * 90-haveged.rules: fix warnings reported by udevadm verify. - Introduce haveged-once.service. * This new service is meant to be called from initrd, and it uses the '--once' flag. * Haveged is executed, and then exits, raising the entropy levels during very early boot. Once / is mounted and 'systemd switch-root' is called, then the regular haveged.service is invoked. * Fix for bsc#1165294 and bsc#1222296. - Improve haveged-dracut.module, so that haveged is called only once from initrd. OBS-URL: https://build.opensuse.org/package/show/security/haveged?expand=0&rev=151
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
Index: haveged-1.9.8/src/haveged.c
|
|
===================================================================
|
|
--- haveged-1.9.8.orig/src/haveged.c
|
|
+++ haveged-1.9.8/src/haveged.c
|
|
@@ -480,8 +480,10 @@ static void daemonize( /* RETURN: no
|
|
void) /* IN: nothing */
|
|
{
|
|
FILE *fh;
|
|
+#if 0
|
|
openlog(params->daemon, LOG_CONS, LOG_DAEMON);
|
|
syslog(LOG_NOTICE, "%s starting up", params->daemon);
|
|
+#endif
|
|
if (daemon(0, 0) == -1)
|
|
error_exit("Cannot fork into the background");
|
|
fh = fopen(params->pid_file, "w");
|
|
@@ -692,7 +694,9 @@ void error_exit( /* RETURN: no
|
|
#ifndef NO_DAEMON
|
|
if (params->detached!=0) {
|
|
unlink(params->pid_file);
|
|
+#if 0
|
|
syslog(LOG_INFO, "%s: %s", params->daemon, buffer);
|
|
+#endif
|
|
}
|
|
else
|
|
#endif
|
|
@@ -802,11 +806,13 @@ static void print_msg( /* RETURN: no
|
|
va_list ap;
|
|
va_start(ap, format);
|
|
snprintf(buffer, sizeof(buffer), "%s: %s", params->daemon, format);
|
|
+#if 0
|
|
#ifndef NO_DAEMON
|
|
if (params->detached != 0)
|
|
vsyslog(LOG_INFO, buffer, ap);
|
|
else
|
|
#endif
|
|
+#endif
|
|
vfprintf(stderr, buffer, ap);
|
|
va_end(ap);
|
|
}
|