Index: /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c
===================================================================
--- /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c	(revision 30390)
+++ /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c	(revision 30391)
@@ -1,4 +1,5 @@
 /** @file
  * VirtualBox File System for Solaris Guests, provider implementation.
+ * Portions contributed by: Ronald.
  */
 
@@ -421,5 +422,5 @@
 		m |= S_IFREG;
 	else if (RTFS_IS_FIFO(info.Attr.fMode))
-		m |= S_IFDIR;
+		m |= S_IFIFO;
 	else if (RTFS_IS_DEV_CHAR(info.Attr.fMode))
 		m |= S_IFCHR;
@@ -451,4 +452,8 @@
 	if (info.Attr.fMode & RTFS_UNIX_ISUID)
 		m |= S_ISUID;
+	if (info.Attr.fMode & RTFS_UNIX_ISGID)
+		m |= S_ISGID;
+	if (info.Attr.fMode & RTFS_UNIX_ISTXT)
+		m |= S_ISVTX;
 	*mode = m;
 	return (0);
Index: /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
===================================================================
--- /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c	(revision 30390)
+++ /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c	(revision 30391)
@@ -1,4 +1,5 @@
 /** @file
  * VirtualBox File System for Solaris Guests, vnode implementation.
+ * Portions contributed by: Ronald.
  */
 
@@ -243,5 +244,5 @@
     LogFlowFunc(("sffs_destroy(%s)%s\n", node->sf_path, node->sf_is_stale ? " stale": ""));
 	if (node->sf_children != 0)
-		panic("sfnode_destroy(%s) has %d children", node->sf_children);
+		panic("sfnode_destroy(%s) has %d children", node->sf_path, node->sf_children);
 	if (node->sf_vnode != NULL)
 		panic("sfnode_destroy(%s) has active vnode", node->sf_path);
@@ -260,5 +261,5 @@
 	if (parent != NULL) {
 		if (parent->sf_children == 0)
-			panic("sfnode_destroy(%s) parent has no child");
+			panic("sfnode_destroy(%s) parent has no child", node->sf_path);
 		--parent->sf_children;
 		if (parent->sf_children == 0 &&
@@ -727,4 +728,18 @@
 		goto done;
 	vap->va_mode = mode & MODEMASK;
+	if (S_ISDIR(mode))
+		vap->va_type = VDIR;
+	else if (S_ISREG(mode))
+		vap->va_type = VREG;
+	else if (S_ISFIFO(mode))
+		vap->va_type = VFIFO;
+	else if (S_ISCHR(mode))
+		vap->va_type = VCHR;
+	else if (S_ISBLK(mode))
+		vap->va_type = VBLK;
+	else if (S_ISLNK(mode))
+		vap->va_type = VLNK;
+	else if (S_ISSOCK(mode))
+		vap->va_type = VSOCK;
 
 	error = sfprov_get_size(node->sf_sffs->sf_handle, node->sf_path, &x);
@@ -787,10 +802,10 @@
 		return (EINVAL);
 	if (uio->uio_loffset >= MAXOFF_T)
-       		return (0);
-        if (uio->uio_loffset < 0)
-       		return (EINVAL);
-        total = uio->uio_resid;
-        if (total == 0)
-       		return (0);
+		return (0);
+	if (uio->uio_loffset < 0)
+		return (EINVAL);
+	total = uio->uio_resid;
+	if (total == 0)
+		return (0);
 
 	mutex_enter(&sffs_lock);
@@ -867,10 +882,10 @@
 	if (vp->v_type != VREG || uiop->uio_loffset < 0) {
 		mutex_exit(&sffs_lock);
-       		return (EINVAL);
+		return (EINVAL);
 	}
 	if (limit == RLIM64_INFINITY || limit > MAXOFFSET_T)
-                limit = MAXOFFSET_T;
+		limit = MAXOFFSET_T;
 	if (limit > MAXOFF_T)
-                limit = MAXOFF_T;
+		limit = MAXOFF_T;
 
 	if (uiop->uio_loffset >= limit) {
@@ -889,9 +904,8 @@
 	}
 
-
-        total = uiop->uio_resid;
-        if (total == 0) {
+	total = uiop->uio_resid;
+	if (total == 0) {
 		mutex_exit(&sffs_lock);
-       		return (0);
+   		return (0);
 	}
 
@@ -900,9 +914,9 @@
 		bytes = MIN(PAGESIZE, uiop->uio_resid);
 		if (offset + bytes >= limit) {
-                	if (offset >= limit) {
-                       		error = EFBIG;
-                       		break;
-                        }
-                        bytes = limit - offset;
+			if (offset >= limit) {
+				error = EFBIG;
+				break;
+			}
+			bytes = limit - offset;
 		}
 		error = uiomove(sffs_buffer, bytes, UIO_WRITE, uiop);
@@ -1408,5 +1422,5 @@
 	vn_invalid(vp);
 	vn_free(vp);
-    LogFlowFunc(("  %s vnode cleared\n", node->sf_path));
+	LogFlowFunc(("  %s vnode cleared\n", node->sf_path));
 
 	/*
