summaryrefslogtreecommitdiff
path: root/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c')
-rw-r--r--security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c b/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c
index e64ad70486a9..dfb4f47233c6 100644
--- a/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c
+++ b/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c
@@ -1,6 +1,6 @@
---- usr/sbin/pkcsslotd/mutex.c.orig 2018-11-16 14:53:03 UTC
+--- usr/sbin/pkcsslotd/mutex.c.orig 2022-04-25 11:04:51 UTC
+++ usr/sbin/pkcsslotd/mutex.c
-@@ -16,10 +16,29 @@
+@@ -16,10 +16,24 @@
#include <sys/stat.h>
#include <grp.h>
#include <string.h>
@@ -9,11 +9,6 @@
#include "log.h"
#include "slotmgr.h"
-+#ifdef __sun
-+#define LOCK_EX F_LOCK
-+#define LOCK_UN F_ULOCK
-+#define flock(fd, func) lockf(fd, func, 0)
-+#endif
+#ifndef LOCK_SH
+#define LOCK_SH 1 /* shared lock */
+#endif
@@ -30,12 +25,12 @@
static int xplfd = -1;
int CreateXProcLock(void)
-@@ -41,7 +60,7 @@ int CreateXProcLock(void)
- goto error;
- }
+@@ -37,7 +51,7 @@ int CreateXProcLock(void)
+ goto error;
+ }
-- grp = getgrnam("pkcs11");
-+ grp = getgrnam(PKCS11GROUP);
- if (grp != NULL) {
- if (fchown(xplfd, -1, grp->gr_gid) == -1) {
- DbgLog(DL0, "%s:fchown(%s):%s\n",
+- grp = getgrnam("pkcs11");
++ grp = getgrnam(PKCS11GROUP);
+ if (grp != NULL) {
+ if (fchown(xplfd, -1, grp->gr_gid) == -1) {
+ DbgLog(DL0, "%s:fchown(%s):%s\n",