summaryrefslogtreecommitdiffstats
path: root/src/VBox/Additions
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/VBox/Additions/Makefile.kmk2
-rw-r--r--src/VBox/Additions/linux/sharedfolders/dirops.c5
-rw-r--r--src/VBox/Additions/linux/sharedfolders/utils.c28
-rw-r--r--src/VBox/Additions/linux/sharedfolders/vfsmod.c3
4 files changed, 25 insertions, 13 deletions
diff --git a/src/VBox/Additions/Makefile.kmk b/src/VBox/Additions/Makefile.kmk
index a0a90098..9f669393 100644
--- a/src/VBox/Additions/Makefile.kmk
+++ b/src/VBox/Additions/Makefile.kmk
@@ -333,7 +333,7 @@ if defined(VBOX_WITH_ADDITIONS_ISO.win.amd64) || defined(VBOX_WITH_ADDITIONS_ISO
ifdef VBOX_TSA_SHA2_URL_ARGS
GUESTADDITIONS_FILESPEC.win += cert/vbox-sha256-timestamp-root.cer=$(VBOX_PATH_ADDITIONS.win)/vbox-sha256-timestamp-root.cer
endif
- if $(intersects win_planb,$(VBOX_WITH_CORP_CODE_SIGNING))
+ if !$(intersects win,$(VBOX_WITH_CORP_CODE_SIGNING)) && $(intersects win_planb,$(VBOX_WITH_CORP_CODE_SIGNING))
GUESTADDITIONS_FILESPEC.win += \
cert/vbox-sha256-r3.cer=$(VBOX_PATH_ADDITIONS.win)/vbox-sha256-r3.cer \
cert/vbox-sha256-r3-root.cer=$(VBOX_PATH_ADDITIONS.win)/vbox-sha256-r3-root.cer \
diff --git a/src/VBox/Additions/linux/sharedfolders/dirops.c b/src/VBox/Additions/linux/sharedfolders/dirops.c
index fb8c8d59..2ff10bb0 100644
--- a/src/VBox/Additions/linux/sharedfolders/dirops.c
+++ b/src/VBox/Additions/linux/sharedfolders/dirops.c
@@ -486,13 +486,14 @@ static int vbsf_dir_read(struct file *dir, void *opaque, filldir_t filldir)
uintptr_t const offEntryInBuf = (uintptr_t)pEntry - (uintptr_t)pBuf;
uint16_t cbSrcName;
uint16_t cchSrcName;
+ char *pszSrcName = pEntry->name.String.ach;
AssertLogRelMsgBreak(offEntryInBuf + RT_UOFFSETOF(SHFLDIRINFO, name.String) <= cbValid,
("%#llx + %#x vs %#x\n", offEntryInBuf, RT_UOFFSETOF(SHFLDIRINFO, name.String), cbValid));
cbSrcName = pEntry->name.u16Size;
cchSrcName = pEntry->name.u16Length;
AssertLogRelBreak(offEntryInBuf + RT_UOFFSETOF(SHFLDIRINFO, name.String) + cbSrcName <= cbValid);
AssertLogRelBreak(cchSrcName < cbSrcName);
- AssertLogRelBreak(pEntry->name.String.ach[cchSrcName] == '\0');
+ AssertLogRelBreak(pszSrcName[cchSrcName] == '\0');
/*
* Filter out '.' and '..' entires.
@@ -500,7 +501,7 @@ static int vbsf_dir_read(struct file *dir, void *opaque, filldir_t filldir)
if ( cchSrcName > 2
|| pEntry->name.String.ach[0] != '.'
|| ( cchSrcName == 2
- && pEntry->name.String.ach[1] != '.')) {
+ && pszSrcName[1] != '.')) {
int const d_type = vbsf_get_d_type(pEntry->Info.Attr.fMode);
ino_t const d_ino = (ino_t)offPos + 0xbeef; /* very fake */
bool fContinue;
diff --git a/src/VBox/Additions/linux/sharedfolders/utils.c b/src/VBox/Additions/linux/sharedfolders/utils.c
index 7c1fba95..0c57c08a 100644
--- a/src/VBox/Additions/linux/sharedfolders/utils.c
+++ b/src/VBox/Additions/linux/sharedfolders/utils.c
@@ -298,10 +298,21 @@ DECLINLINE(int) sf_file_mode_to_linux(uint32_t fVBoxMode, int fFixedMode, int fC
*/
static void vbsf_update_inode_timestamps(struct inode *pInode, PSHFLFSOBJINFO pObjInfo)
{
-#if RTLNX_VER_MIN(6,6,0)
- struct timespec64 ts;
- vbsf_time_to_linux(&ts, &pObjInfo->ChangeTime);
- inode_set_ctime_to_ts(pInode, ts);
+#if RTLNX_VER_MIN(6,7,0)
+ struct timespec64 tsAccessTime, tsChangeTime, ModificationTime;
+
+ vbsf_time_to_linux(&tsAccessTime, &pObjInfo->AccessTime);
+ vbsf_time_to_linux(&tsChangeTime, &pObjInfo->ChangeTime);
+ vbsf_time_to_linux(&ModificationTime, &pObjInfo->ModificationTime);
+
+ inode_set_atime_to_ts(pInode, tsAccessTime);
+ inode_set_ctime_to_ts(pInode, tsChangeTime);
+ inode_set_mtime_to_ts(pInode, ModificationTime);
+
+# elif RTLNX_VER_MIN(6,6,0)
+ vbsf_time_to_linux(&pInode->i_atime, &pObjInfo->AccessTime);
+ vbsf_time_to_linux(&pInode->__i_ctime, &pObjInfo->ChangeTime);
+ vbsf_time_to_linux(&pInode->i_mtime, &pObjInfo->ModificationTime);
#else
vbsf_time_to_linux(&pInode->i_atime, &pObjInfo->AccessTime);
vbsf_time_to_linux(&pInode->i_ctime, &pObjInfo->ChangeTime);
@@ -1047,10 +1058,11 @@ static int vbsf_make_path(const char *caller, struct vbsf_inode_info *sf_i,
if (fRoot)
RT_BCOPY_UNFORTIFIED(&tmp->String.utf8[0], d_name, d_len + 1);
else {
- RT_BCOPY_UNFORTIFIED(&tmp->String.utf8[0], p_name, p_len);
- tmp->String.utf8[p_len] = '/';
- RT_BCOPY_UNFORTIFIED(&tmp->String.utf8[p_len + 1], d_name, d_len);
- tmp->String.utf8[p_len + 1 + d_len] = '\0';
+ uint8_t *pszPath = tmp->String.utf8;
+ RT_BCOPY_UNFORTIFIED(&pszPath[0], p_name, p_len);
+ pszPath[p_len] = '/';
+ RT_BCOPY_UNFORTIFIED(&pszPath[p_len + 1], d_name, d_len);
+ pszPath[p_len + 1 + d_len] = '\0';
}
*result = tmp;
diff --git a/src/VBox/Additions/linux/sharedfolders/vfsmod.c b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
index 0c5c77af..5c4d55c1 100644
--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c
+++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
@@ -474,8 +474,7 @@ static int vbsf_create_root_inode(struct super_block *sb, struct vbsf_super_info
path->u16Length = 1;
path->u16Size = 2;
- path->String.utf8[0] = '/';
- path->String.utf8[1] = 0;
+ RTStrCopy(path->String.utf8, path->u16Size, "/");
/*
* Stat the root directory (for inode info).