diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index fa8db173be..78a37d2e8b 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -494,7 +494,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path, break; case UUIDD_OP_TIME_UUID: num = 1; - __uuid_generate_time(uu, &num); + if (__uuid_generate_time(uu, &num) < 0 && !uuidd_cxt->quiet) + warnx(_("failed to open/lock clock counter")); if (uuidd_cxt->debug) { uuid_unparse(uu, str); fprintf(stderr, _("Generated time UUID: %s\n"), str); @@ -504,7 +505,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path, break; case UUIDD_OP_RANDOM_UUID: num = 1; - __uuid_generate_random(uu, &num); + if (__uuid_generate_time(uu, &num) < 0 && !uuidd_cxt->quiet) + warnx(_("failed to open/lock clock counter")); if (uuidd_cxt->debug) { uuid_unparse(uu, str); fprintf(stderr, _("Generated random UUID: %s\n"), str); @@ -513,7 +515,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path, reply_len = sizeof(uu); break; case UUIDD_OP_BULK_TIME_UUID: - __uuid_generate_time(uu, &num); + if (__uuid_generate_time(uu, &num) < 0 && !uuidd_cxt->quiet) + warnx(_("failed to open/lock clock counter")); if (uuidd_cxt->debug) { uuid_unparse(uu, str); fprintf(stderr, P_("Generated time UUID %s " diff --git a/misc-utils/uuidd.service.in b/misc-utils/uuidd.service.in index b4c9c46350..e64ca59b52 100644 --- a/misc-utils/uuidd.service.in +++ b/misc-utils/uuidd.service.in @@ -18,6 +18,7 @@ ProtectKernelModules=yes ProtectControlGroups=yes RestrictAddressFamilies=AF_UNIX MemoryDenyWriteExecute=yes +ReadWritePaths=/var/lib/libuuid/ SystemCallFilter=@default @file-system @basic-io @system-service @signal @io-event @network-io [Install]