1
0
Fork 0

Adding patch to create /dev/shm in haveged itself if it is not existing (Closes: #1087324).

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 13:17:44 +01:00
parent 1b70937fc4
commit 63be4f95dd
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,19 @@
Author: Daniel Baumann <daniel@debian.org>
Description: Creating /dev/shm if its not existing (Closes: #1087324).
diff -Naurp haveged.orig/src/haveged.c haveged/src/haveged.c
--- haveged.orig/src/haveged.c 2025-01-14 18:44:32.651852997 +0100
+++ haveged/src/haveged.c 2025-01-14 19:30:07.495863674 +0100
@@ -490,6 +490,12 @@ int main(int argc, char **argv)
}
}
/* Initilize named semaphore to synchronize command isntances */
+ if (mkdir("/dev/shm", 0755) != 0) {
+ if (errno != EEXIST) {
+ error_exit("Couldn't create /dev/shm directory: %s", strerror(errno));
+ }
+ }
+
sem = sem_open(SEM_NAME, O_CREAT, 0644, 1);
if (sem == NULL) {
error_exit("Couldn't create nammed semaphore " SEM_NAME" error: %s", strerror(errno));

1
debian/patches/series vendored Normal file
View file

@ -0,0 +1 @@
debian/0001-shm-directory.patch