403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/security/opencryptoki/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/security/opencryptoki/files/patch-usr-lib-common-loadsave.c
--- usr/lib/common/loadsave.c.orig	2022-04-25 11:04:51 UTC
+++ usr/lib/common/loadsave.c
@@ -20,17 +20,22 @@
 #include <string.h>
 #include <strings.h>
 #include <unistd.h>
+#if !defined(__FreeBSD__)
 #include <alloca.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ipc.h>
-#include <sys/file.h>
 #include <errno.h>
 #include <syslog.h>
 #include <pwd.h>
 #include <grp.h>
 #include <openssl/evp.h>
+#if !defined(__FreeBSD__)
 #include <endian.h>
+#else
+#include <sys/endian.h>
+#endif
 
 #include "pkcs11types.h"
 #include "defs.h"
@@ -132,7 +137,7 @@ void set_perm(int file)
         // Set absolute permissions or rw-rw----
         fchmod(file, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
 
-        grp = getgrnam("pkcs11");       // Obtain the group id
+        grp = getgrnam(PKCS11GROUP);       // Obtain the group id
         if (grp) {
             // set ownership to pkcs11 group
             if (fchown(file, -1, grp->gr_gid) != 0) {
@@ -303,7 +308,11 @@ CK_RV init_data_store(STDLL_TokData_t *tokdata, char *
         tokdata->pk_dir = NULL;
     }
 
+#if !defined(__FreeBSD__)
     if ((pkdir = secure_getenv("PKCS_APP_STORE")) != NULL) {
+#else
+    if ((pkdir = getenv("PKCS_APP_STORE")) != NULL) {
+#endif
         pklen = strlen(pkdir) + 1024;
         tokdata->pk_dir = (char *) calloc(pklen, 1);
         if (!(tokdata->pk_dir))

Youez - 2016 - github.com/yon3zu
LinuXploit