summaryrefslogtreecommitdiff
path: root/net/samba420/files/0102-FreeBSD-vfs_freebsd-fix-sys_proc_fd_path-args.patch
blob: 62bd8f0a12966440d3b4393ae650fed9a10b8e59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 2024-08-05
# NOTE: The 'sys_proc_fd_path' function had its signature changed in commit 9f63fad392f3 to drop
#	the third 'size_t bufsize' parameter.  Upstream changed all of the code except for that
#	in vfs_freebsd.c.

diff -Naurp a/source3/modules/vfs_freebsd.c b/source3/modules/vfs_freebsd.c
--- a/source3/modules/vfs_freebsd.c	2024-08-05 20:18:53.656593000 -0400
+++ b/source3/modules/vfs_freebsd.c	2024-08-05 20:22:54.634979000 -0400
@@ -197,7 +197,7 @@ static ssize_t extattr_size(struct files_struct *fsp, 
 		const char *path = fsp->fsp_name->base_name;
 		if (fsp->fsp_flags.have_proc_fds) {
 			char buf[PATH_MAX];
-			path = sys_proc_fd_path(fd, buf, sizeof(buf));
+			path = sys_proc_fd_path(fd, &buf);
 			if (path == NULL) {
 				return -1;
 			}
@@ -251,7 +251,7 @@ static ssize_t freebsd_extattr_list(struct files_struc
 			const char *path = fsp->fsp_name->base_name;
 			if (fsp->fsp_flags.have_proc_fds) {
 				char buf[PATH_MAX];
-				path = sys_proc_fd_path(fd, buf, sizeof(buf));
+				path = sys_proc_fd_path(fd, &buf);
 				if (path == NULL) {
 					return -1;
 				}
@@ -431,7 +431,7 @@ static ssize_t freebsd_fgetxattr(struct vfs_handle_str
 		const char *path = fsp->fsp_name->base_name;
 		if (fsp->fsp_flags.have_proc_fds) {
 			char buf[PATH_MAX];
-			path = sys_proc_fd_path(fd, buf, sizeof(buf));
+			path = sys_proc_fd_path(fd, &buf);
 			if (path == NULL) {
 				return -1;
 			}
@@ -506,7 +506,7 @@ static int freebsd_fremovexattr(struct vfs_handle_stru
 		const char *path = fsp->fsp_name->base_name;
 		if (fsp->fsp_flags.have_proc_fds) {
 			char buf[PATH_MAX];
-			path = sys_proc_fd_path(fd, buf, sizeof(buf));
+			path = sys_proc_fd_path(fd, &buf);
 			if (path == NULL) {
 				return -1;
 			}
@@ -583,7 +583,7 @@ static int freebsd_fsetxattr(struct vfs_handle_struct 
 		const char *path = fsp->fsp_name->base_name;
 		if (fsp->fsp_flags.have_proc_fds) {
 			char buf[PATH_MAX];
-			path = sys_proc_fd_path(fd, buf, sizeof(buf));
+			path = sys_proc_fd_path(fd, &buf);
 			if (path == NULL) {
 				return -1;
 			}