403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
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/net/glusterfs/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/net/glusterfs/files/patch-libglusterfs_src_syscall.c
--- libglusterfs/src/syscall.c.orig	2020-08-04 12:41:32 UTC
+++ libglusterfs/src/syscall.c
@@ -13,6 +13,10 @@
 #include "glusterfs/mem-pool.h"
 #include "glusterfs/libglusterfs-messages.h"
 
+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+#include <signal.h>
+#endif
 #include <sys/types.h>
 #include <utime.h>
 #include <sys/time.h>
@@ -506,9 +510,17 @@ sys_lsetxattr(const char *path, const char *name, cons
 #endif
 
 #ifdef GF_BSD_HOST_OS
-    return FS_RET_CHECK0(
+    ssize_t ret = FS_RET_CHECK(
         extattr_set_link(path, EXTATTR_NAMESPACE_USER, name, value, size),
         errno);
+    /* On BSD extattr_set_link returns the number of bytes written/read on
+     * success. Force this to be 0 if it was successful so the result remains
+     * compatible with other platform expectations.
+     */
+    if(ret > 0) {
+       ret = 0;
+    }
+    return ret;
 #endif
 
 #ifdef GF_SOLARIS_HOST_OS
@@ -624,9 +636,17 @@ sys_fsetxattr(int filedes, const char *name, const voi
 #endif
 
 #ifdef GF_BSD_HOST_OS
-    return FS_RET_CHECK0(
+    ssize_t ret = FS_RET_CHECK(
         extattr_set_fd(filedes, EXTATTR_NAMESPACE_USER, name, value, size),
         errno);
+    /* On BSD extattr_set_fd returns the number of bytes written/read on
+     * success. Force this to be 0 if it was successful so the result remains
+     * compatible with other platform expectations.
+     */
+    if(ret > 0) {
+       ret = 0;
+    }
+    return ret;
 #endif
 
 #ifdef GF_SOLARIS_HOST_OS
@@ -854,3 +874,18 @@ sys_copy_file_range(int fd_in, off64_t *off_in, int fd
 #endif /* HAVE_COPY_FILE_RANGE_SYS */
 #endif /* HAVE_COPY_FILE_RANGE */
 }
+
+#ifdef __FreeBSD__
+int
+sys_kill(pid_t pid, int sig)
+{
+    return FS_RET_CHECK0(kill(pid, sig), errno);
+}
+
+int
+sys_sysctl(const int *name, u_int namelen, void *oldp,	size_t *oldlenp,
+		 const void *newp, size_t newlen)
+{
+	return FS_RET_CHECK0(sysctl(name, namelen, oldp, oldlenp, newp, newlen), errno);
+}
+#endif

Youez - 2016 - github.com/yon3zu
LinuXploit