diff options
Diffstat (limited to 'security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c')
-rw-r--r-- | security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c b/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c index 6169b34024d4..e64ad70486a9 100644 --- a/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c +++ b/security/opencryptoki/files/patch-usr-sbin-pkcsslotd-mutex.c @@ -1,41 +1,41 @@ ---- usr/sbin/pkcsslotd/mutex.c.orig 2016-04-29 17:26:46 UTC +--- usr/sbin/pkcsslotd/mutex.c.orig 2018-11-16 14:53:03 UTC +++ usr/sbin/pkcsslotd/mutex.c -@@ -281,10 +281,28 @@ - legal action under this Agreement more than one year after - the cause of action arose. Each party waives its rights to - a jury trial in any resulting litigation. -+*/ - +@@ -16,10 +16,29 @@ + #include <sys/stat.h> + #include <grp.h> + #include <string.h> +#include <fcntl.h> + #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) ++#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 */ ++#define LOCK_SH 1 /* shared lock */ +#endif +#ifndef LOCK_EX -+#define LOCK_EX 2 /* exclusive lock */ ++#define LOCK_EX 2 /* exclusive lock */ +#endif +#ifndef LOCK_NB -+#define LOCK_NB 4 /* don't block when locking */ ++#define LOCK_NB 4 /* don't block when locking */ +#endif +#ifndef LOCK_UN -+#define LOCK_UN 8 /* unlock */ ++#define LOCK_UN 8 /* unlock */ +#endif ++ + static int xplfd = -1; - /* (C) COPYRIGHT International Business Machines Corp. 2001 */ - -@@ -323,7 +341,7 @@ CreateXProcLock(void) - goto error; - } + int CreateXProcLock(void) +@@ -41,7 +60,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", |