/
kernel-6.8.patch
76 lines (66 loc) · 2.77 KB
/
kernel-6.8.patch
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From: Jiri Slaby <jslaby@suse.cz>
Subject: fix build with Linux 6.8
Patch-mainline: no
References: kernel 6.8
strlcpy() was removed in commit d26270061ae6 (string: Remove strlcpy()), use
strscpy() instead.
The patches fixes this (and similar):
modules_build_dir/default/vboxsf/vfsmod.c:1411:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’?
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c | 6 +++---
src/VBox/Additions/linux/sharedfolders/vfsmod.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
--- a/vboxguest/VBoxGuest-linux.c.orig
+++ b/vboxguest/VBoxGuest-linux.c
@@ -1361,7 +1361,7 @@ static int vgdrvLinuxParamLogGrpSet(cons
RTLogGroupSettings(pLogger, pszValue);
}
else if (pParam->name[0] != 'd')
- strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
+ strscpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
return 0;
}
@@ -1387,7 +1387,7 @@ static int vgdrvLinuxParamLogFlagsSet(co
RTLogFlags(pLogger, pszValue);
}
else if (pParam->name[0] != 'd')
- strlcpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags));
+ strscpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags));
return 0;
}
@@ -1412,7 +1412,7 @@ static int vgdrvLinuxParamLogDstSet(cons
RTLogDestinations(pLogger, pszValue);
}
else if (pParam->name[0] != 'd')
- strlcpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst));
+ strscpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst));
return 0;
}
--- a/vboxsf/vfsmod.c.orig
+++ b/vboxsf/vfsmod.c
@@ -1408,7 +1408,7 @@ static int vbsf_parse_param(struct fs_co
switch (opt) {
case Opt_iocharset:
case Opt_nls:
- strlcpy(info->nls_name, param->string, sizeof(info->nls_name));
+ strscpy(info->nls_name, param->string, sizeof(info->nls_name));
break;
case Opt_uid:
info->uid = result.uint_32;
@@ -1469,7 +1469,7 @@ static int vbsf_parse_param(struct fs_co
printk(KERN_WARNING "vboxsf: cache mode (%u) is out of range, using default instead.\n", result.uint_32);
break;
case Opt_tag:
- strlcpy(info->szTag, param->string, sizeof(info->szTag));
+ strscpy(info->szTag, param->string, sizeof(info->szTag));
break;
default:
return invalf(fc, "Invalid mount option: '%s'", param->key);
@@ -1528,7 +1528,7 @@ static int vbsf_get_tree(struct fs_conte
}
/* fc->source (the shared folder name) is set after vbsf_init_fs_ctx() */
- strlcpy(info->name, fc->source, sizeof(info->name));
+ strscpy(info->name, fc->source, sizeof(info->name));
# if RTLNX_VER_MAX(5,3,0)
return vfs_get_super(fc, vfs_get_independent_super, vbsf_read_super_aux);