View | Details | Raw Unified | Return to bug 246751
Collapse All | Expand All

(-)sysutils/fusefs-smbnetfs/Makefile (-2 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	smbnetfs
4
PORTNAME=	smbnetfs
5
PORTVERSION=	0.6.1
5
PORTVERSION=	0.6.2
6
PORTREVISION=	3
7
CATEGORIES=	sysutils net
6
CATEGORIES=	sysutils net
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/SMBNetFS-${PORTVERSION}
7
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/SMBNetFS-${PORTVERSION}
9
PKGNAMEPREFIX=	fusefs-
8
PKGNAMEPREFIX=	fusefs-
(-)sysutils/fusefs-smbnetfs/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1517243562
1
TIMESTAMP = 1590478609
2
SHA256 (smbnetfs-0.6.1.tar.bz2) = 848b8ee4c1b5cc4c83ee35736cb28e1ddcd5789cca948f060e8cb76baa95380a
2
SHA256 (smbnetfs-0.6.2.tar.bz2) = 205b2d32a8b9d9f5093e82c9a4f9fc086baecf8457df4c8b51898334d149a9a7
3
SIZE (smbnetfs-0.6.1.tar.bz2) = 171032
3
SIZE (smbnetfs-0.6.2.tar.bz2) = 174322
(-)sysutils/fusefs-smbnetfs/files/patch-3 (-117 lines)
Lines 1-117 Link Here
1
Part of the:
2
3
	https://sourceforge.net/p/smbnetfs/patches/3/
4
5
--- src/samba.h	2018-01-04 20:59:38.000000000 +0000
6
+++ src/samba.h	2018-01-31 14:48:19.375119000 +0000
7
@@ -16,6 +16,6 @@
8
 samba_fd samba_open       (const char *url, int flags, mode_t mode);
9
 samba_fd samba_creat      (const char *url, mode_t mode);
10
-ssize_t  samba_read       (samba_fd fd, off_t offset, void *buf, size_t bufsize);
11
-ssize_t  samba_write      (samba_fd fd, off_t offset, void *buf, size_t bufsize);
12
+ssize_t  samba_read       (samba_fd fd, off_t offset, char *buf, size_t bufsize);
13
+ssize_t  samba_write      (samba_fd fd, off_t offset, const char *buf, size_t bufsize);
14
 int      samba_close      (samba_fd fd);
15
 int      samba_unlink     (const char *url);
16
--- src/samba.c	2018-01-04 20:59:38.000000000 +0000
17
+++ src/samba.c	2018-01-31 14:49:26.546183000 +0000
18
@@ -255,5 +255,5 @@
19
 }
20
 
21
-ssize_t samba_read(samba_fd fd, off_t offset, void *buf, size_t bufsize){
22
+ssize_t samba_read(samba_fd fd, off_t offset, char *buf, size_t bufsize){
23
     ssize_t	result = 0;
24
 
25
@@ -278,5 +278,5 @@
26
 }
27
 
28
-ssize_t samba_write(samba_fd fd, off_t offset, void *buf, size_t bufsize){
29
+ssize_t samba_write(samba_fd fd, off_t offset, const char *buf, size_t bufsize){
30
     ssize_t	result = 0;
31
 
32
Constify the writing and reduce the number of calls to time().
33
34
	-mi
35
36
--- src/smb_conn.h	2018-01-04 20:59:38
37
+++ src/smb_conn.h	2018-01-31 14:55:24
38
@@ -46,5 +46,5 @@
39
 ssize_t smb_conn_write(struct smb_conn_ctx *ctx,
40
 			smb_conn_fd fd, off_t offset,
41
-			void *buf, size_t bufsize);
42
+			const void *buf, size_t bufsize);
43
 int smb_conn_close(struct smb_conn_ctx *ctx,
44
 			smb_conn_fd fd);
45
--- src/smb_conn.c	2018-01-04 20:59:38
46
+++ src/smb_conn.c	2018-01-31 14:54:37
47
@@ -630,6 +630,5 @@
48
 
49
     pthread_mutex_lock(&ctx->mutex);
50
-    ctx->access_time = time(NULL);
51
-    file->access_time = time(NULL);
52
+    ctx->access_time = file->access_time = time(NULL);
53
     error = smb_conn_process_query(
54
 			ctx, OPEN,
55
@@ -676,6 +675,5 @@
56
 
57
     pthread_mutex_lock(&ctx->mutex);
58
-    ctx->access_time = time(NULL);
59
-    file->access_time = time(NULL);
60
+    ctx->access_time = file->access_time = time(NULL);
61
     error = smb_conn_process_query(
62
 			ctx, CREAT,
63
@@ -719,6 +717,5 @@
64
     pthread_mutex_lock(&ctx->mutex);
65
     if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){
66
-	ctx->access_time = time(NULL);
67
-	file->access_time = time(NULL);
68
+	ctx->access_time = file->access_time = time(NULL);
69
 	error = smb_conn_process_fd_query(
70
 			ctx, READ, file,
71
@@ -740,5 +737,5 @@
72
 ssize_t smb_conn_write(struct smb_conn_ctx *ctx,
73
 			smb_conn_fd fd, off_t offset,
74
-			void *buf, size_t bufsize){
75
+			const void *buf, size_t bufsize){
76
 
77
     int					error;
78
@@ -762,6 +759,5 @@
79
     pthread_mutex_lock(&ctx->mutex);
80
     if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){
81
-	ctx->access_time = time(NULL);
82
-	file->access_time = time(NULL);
83
+	ctx->access_time = file->access_time = time(NULL);
84
 	memcpy(ctx->shmem_ptr, buf, bufsize);
85
 	msync(ctx->shmem_ptr, bufsize, MS_SYNC);
86
@@ -886,6 +882,5 @@
87
 
88
     pthread_mutex_lock(&ctx->mutex);
89
-    ctx->access_time = time(NULL);
90
-    file->access_time = time(NULL);
91
+    ctx->access_time = file->access_time = time(NULL);
92
     error = smb_conn_process_query(
93
 			ctx, OPENDIR,
94
@@ -964,6 +959,5 @@
95
     pthread_mutex_lock(&ctx->mutex);
96
     if ((file->reopen_cmd == OPENDIR) && (file->ctx == ctx)){
97
-	ctx->access_time = time(NULL);
98
-	file->access_time = time(NULL);
99
+	ctx->access_time = file->access_time = time(NULL);
100
 
101
 	/* we cant reopen directory with non-zero offset, so use               */
102
@@ -1104,6 +1098,5 @@
103
     pthread_mutex_lock(&ctx->mutex);
104
     if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){
105
-	ctx->access_time = time(NULL);
106
-	file->access_time = time(NULL);
107
+	ctx->access_time = file->access_time = time(NULL);
108
 	error = smb_conn_process_fd_query(
109
 			ctx, FSTAT, file,
110
@@ -1141,6 +1134,5 @@
111
     pthread_mutex_lock(&ctx->mutex);
112
     if ((file->reopen_cmd == OPEN) && (file->ctx == ctx)){
113
-	ctx->access_time = time(NULL);
114
-	file->access_time = time(NULL);
115
+	ctx->access_time = file->access_time = time(NULL);
116
 	error = smb_conn_process_fd_query(
117
 			ctx, FTRUNCATE, file,
(-)sysutils/fusefs-smbnetfs/files/patch-bug47 (-12 lines)
Lines 1-12 Link Here
1
See:
2
	https://sourceforge.net/p/smbnetfs/git/ci/fc721fecd9ea47a671cfa3acc4d2d0127bfdfc8c/
3
4
--- src/reconfigure.c	2018-01-04 15:59:38.000000000 -0500
5
+++ src/reconfigure.c	2019-10-03 09:25:22.227842000 -0400
6
@@ -295,5 +295,5 @@
7
 #ifdef HAVE_LIBSECRET
8
     /* auth-libsecret.h */
9
-    if (strcasecmp(option, "use_libsecter") == 0)
10
+    if (strcasecmp(option, "use_libsecret") == 0)
11
 	return reconfigure_set_boolean(value, libsecret_enable);
12
     if (strcasecmp(option, "libsecret_timeout") == 0)
(-)sysutils/fusefs-smbnetfs/files/patch-src_function.c (-12 lines)
Lines 1-12 Link Here
1
--- src/function.c	2018-01-04 20:59:38 UTC
2
+++ src/function.c
3
@@ -8,7 +8,9 @@
4
 #include <dirent.h>
5
 #include <sys/statvfs.h>
6
 #include <sys/types.h>
7
+#ifdef __linux__
8
 #include <attr/xattr.h>
9
+#endif
10
 #include <time.h>
11
 #include <pthread.h>
12
 #include <libsmbclient.h>
(-)sysutils/fusefs-smbnetfs/files/patch-src_list.h (-38 lines)
Lines 1-38 Link Here
1
--- src/list.h	2018-01-04 20:59:38 UTC
2
+++ src/list.h
3
@@ -23,7 +23,7 @@ static inline LIST* last_list_elem(LIST 
4
 
5
 static inline void add_to_list(LIST *list, LIST *elem){
6
     /* Yes, i want SIGSEGV for debug */
7
-    if ((elem->next != NULL) || (elem->prev != NULL)) *((char*)NULL) = '\0';
8
+    if ((elem->next != NULL) || (elem->prev != NULL)) __builtin_trap();
9
 
10
     elem->next = list->next;
11
     elem->prev = list;
12
@@ -33,7 +33,7 @@ static inline void add_to_list(LIST *lis
13
 
14
 static inline void add_to_list_back(LIST *list, LIST *elem){
15
     /* Yes, i want SIGSEGV for debug */
16
-    if ((elem->next != NULL) || (elem->prev != NULL)) *((char*)NULL) = '\0';
17
+    if ((elem->next != NULL) || (elem->prev != NULL)) __builtin_trap();
18
 
19
     elem->next = list;
20
     elem->prev = list->prev;
21
@@ -45,7 +45,7 @@ static inline void insert_to_list_after(
22
     (void)list;
23
 
24
     /* Yes, i want SIGSEGV for debug */
25
-    if ((new_elem->next != NULL) || (new_elem->prev != NULL)) *((char*)NULL) = '\0';
26
+    if ((new_elem->next != NULL) || (new_elem->prev != NULL)) __builtin_trap();
27
 
28
     new_elem->next = elem->next;
29
     new_elem->prev = elem;
30
@@ -57,7 +57,7 @@ static inline void insert_to_list_before
31
     (void)list;
32
 
33
     /* Yes, i want SIGSEGV for debug */
34
-    if ((new_elem->next != NULL) || (new_elem->prev != NULL)) *((char*)NULL) = '\0';
35
+    if ((new_elem->next != NULL) || (new_elem->prev != NULL)) __builtin_trap();
36
 
37
     new_elem->next = elem;
38
     new_elem->prev = elem->prev;

Return to bug 246751