diff options
author | Dan Streetman <ddstreet@canonical.com> | 2020-09-08 19:10:37 +0200 |
---|---|---|
committer | Dan Streetman <ddstreet@canonical.com> | 2020-09-08 19:25:22 +0200 |
commit | 05e29c343ab5af345960127ba0bed7d730eee6c8 (patch) | |
tree | bf558226377ec554cf98a335a151af31537552ec /src/haveged.c | |
parent | Fixed Wsign-compare compiler warnings (diff) | |
download | haveged-05e29c343ab5af345960127ba0bed7d730eee6c8.tar.xz haveged-05e29c343ab5af345960127ba0bed7d730eee6c8.zip |
don't fail completely if we can't set write wakeup watermark
We won't have access to change the watermark if we're running in
an unprivileged container, so if the error is EACCES just warn
and continue
Diffstat (limited to 'src/haveged.c')
-rw-r--r-- | src/haveged.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/haveged.c b/src/haveged.c index 014b4ba..733d0da 100644 --- a/src/haveged.c +++ b/src/haveged.c @@ -694,6 +694,9 @@ static void set_watermark( /* RETURN: nothing */ fprintf(wm_fh, "%d\n", level); fclose(wm_fh); } + else if (errno == EACCES) + fprintf(stderr, "No access to %s, can't set watermark (maybe running in a container?)\n", + params->watermark); else error_exit("Fail:set_watermark()!"); } #endif |