diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 22:55:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 22:55:52 +0000 |
commit | cd47c2446f1a9dee96610f298989848f8986a8be (patch) | |
tree | 02c30d62a9164987d0aaba2f72c58a50053205d6 /src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c | |
parent | Releasing progress-linux version 7.0.14-dfsg-4~progress7.99u1. (diff) | |
download | virtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.tar.xz virtualbox-cd47c2446f1a9dee96610f298989848f8986a8be.zip |
Merging upstream version 7.0.16-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c index 538a0bc4..499ad791 100644 --- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c +++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c @@ -79,6 +79,7 @@ #include <iprt/string.h> #include <VBox/err.h> #include <VBox/log.h> +#include <VBox/VBoxLnxModInline.h> /********************************************************************************************************************************* @@ -661,6 +662,10 @@ static int __init vgdrvLinuxModInit(void) PRTLOGGER pRelLogger; int rc; + /* Check if modue loading was disabled. */ + if (!vbox_mod_should_load()) + return -EINVAL; + /* * Initialize IPRT first. */ @@ -1361,8 +1366,7 @@ static int vgdrvLinuxParamLogGrpSet(const char *pszValue, CONST_4_15 struct kern RTLogGroupSettings(pLogger, pszValue); } else if (pParam->name[0] != 'd') - strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp)); - + RTStrCopy(&g_szLogGrp[0], sizeof(g_szLogGrp), pszValue); return 0; } @@ -1387,7 +1391,7 @@ static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, CONST_4_15 struct ke RTLogFlags(pLogger, pszValue); } else if (pParam->name[0] != 'd') - strlcpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags)); + RTStrCopy(&g_szLogFlags[0], sizeof(g_szLogFlags), pszValue); return 0; } @@ -1412,7 +1416,7 @@ static int vgdrvLinuxParamLogDstSet(const char *pszValue, CONST_4_15 struct kern RTLogDestinations(pLogger, pszValue); } else if (pParam->name[0] != 'd') - strlcpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst)); + RTStrCopy(&g_szLogDst[0], sizeof(g_szLogDst), pszValue); return 0; } |