summaryrefslogtreecommitdiff
path: root/security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c')
-rw-r--r--security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c b/security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c
index 77e821c60edc..f8ddb5bb7682 100644
--- a/security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c
+++ b/security/opencryptoki/files/patch-usr-lib-pkcs11-common-utility.c
@@ -1,11 +1,14 @@
---- usr/lib/pkcs11/common/utility.c.orig 2010-07-29 21:28:41.000000000 +0900
-+++ usr/lib/pkcs11/common/utility.c 2010-10-20 00:19:02.740983592 +0900
-@@ -302,6 +302,26 @@
- #include <errno.h>
- #include <pwd.h>
+--- usr/lib/pkcs11/common/utility.c.orig 2016-04-29 17:26:46 UTC
++++ usr/lib/pkcs11/common/utility.c
+@@ -275,9 +275,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.
++*/
+#include <fcntl.h>
-+
+
+-*/
+#ifdef __sun
+#define LOCK_EX F_LOCK
+#define LOCK_UN F_ULOCK
@@ -25,5 +28,23 @@
+#define LOCK_UN 8 /* unlock */
+#endif
- #include "pkcs11types.h"
- #include "defs.h"
+ /* (C) COPYRIGHT International Business Machines Corp. 2001,2002 */
+
+@@ -587,7 +606,7 @@ CK_RV CreateXProcLock(void)
+ goto err;
+ }
+
+- grp = getgrnam("pkcs11");
++ grp = getgrnam(PKCS11GROUP);
+ if (grp != NULL) {
+ if (fchown(spinxplfd, -1, grp->gr_gid)
+ == -1) {
+@@ -1131,7 +1150,7 @@ CK_RV check_user_and_group()
+ * when forked). So we need to get the group information.
+ * Really need to take the uid and map it to a name.
+ */
+- grp = getgrnam("pkcs11");
++ grp = getgrnam(PKCS11GROUP);
+ if (grp == NULL) {
+ OCK_SYSLOG(LOG_ERR, "getgrnam() failed: %s\n", strerror(errno));
+ goto error;