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:
parent
1b70937fc4
commit
63be4f95dd
2 changed files with 20 additions and 0 deletions
19
debian/patches/debian/0001-shm-directory.patch
vendored
Normal file
19
debian/patches/debian/0001-shm-directory.patch
vendored
Normal 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
1
debian/patches/series
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
debian/0001-shm-directory.patch
|
Loading…
Add table
Reference in a new issue