ports/net/samba420/files/0102-FreeBSD-vfs_freebsd-fix-sys_proc_fd_path-args.patch
Joshua Kinard 17ce87864b net/samba420: Update 4.20
Changelog:	https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.20

PR:             280533
Sponsored by:   Klara, Inc.
Approved by:    0mp (mentor)
Approved by:    samba (0mp, kiwi)
Co-authored-by:	Xavier Beaudouin <kiwi@FreeBSD.org>
2025-01-30 15:42:00 +01:00

53 lines
2 KiB
Diff

# 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;
}