summaryrefslogtreecommitdiffstats
path: root/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c')
-rw-r--r--src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c12
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;
}