Changeset 71405 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Mar 20, 2018 2:20:36 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r71364 r71405 995 995 bool const fImpersonated = RT_BOOL(pSession->fFlags & ( VBOXSERVICECTRLSESSION_FLAG_SPAWN 996 996 | VBOXSERVICECTRLSESSION_FLAG_ANONYMOUS)); 997 int rc; 997 int rc = VERR_NOT_SUPPORTED; /* Play safe by default. */ 998 998 999 switch (uMsg) 999 1000 { … … 1007 1008 if (fImpersonated) 1008 1009 rc = vgsvcGstCtrlSessionHandleDirRemove(pSession, pHostCtx); 1009 else1010 rc = VERR_NOT_SUPPORTED;1011 1010 break; 1012 1011 … … 1034 1033 if (fImpersonated) 1035 1034 rc = vgsvcGstCtrlSessionHandleFileOpen(pSession, pHostCtx); 1036 else1037 rc = VERR_NOT_SUPPORTED;1038 1035 break; 1039 1036 … … 1041 1038 if (fImpersonated) 1042 1039 rc = vgsvcGstCtrlSessionHandleFileClose(pSession, pHostCtx); 1043 else1044 rc = VERR_NOT_SUPPORTED;1045 1040 break; 1046 1041 … … 1048 1043 if (fImpersonated) 1049 1044 rc = vgsvcGstCtrlSessionHandleFileRead(pSession, pHostCtx, pvScratchBuf, cbScratchBuf); 1050 else1051 rc = VERR_NOT_SUPPORTED;1052 1045 break; 1053 1046 … … 1055 1048 if (fImpersonated) 1056 1049 rc = vgsvcGstCtrlSessionHandleFileReadAt(pSession, pHostCtx, pvScratchBuf, cbScratchBuf); 1057 else1058 rc = VERR_NOT_SUPPORTED;1059 1050 break; 1060 1051 … … 1062 1053 if (fImpersonated) 1063 1054 rc = vgsvcGstCtrlSessionHandleFileWrite(pSession, pHostCtx, pvScratchBuf, cbScratchBuf); 1064 else1065 rc = VERR_NOT_SUPPORTED;1066 1055 break; 1067 1056 … … 1069 1058 if (fImpersonated) 1070 1059 rc = vgsvcGstCtrlSessionHandleFileWriteAt(pSession, pHostCtx, pvScratchBuf, cbScratchBuf); 1071 else1072 rc = VERR_NOT_SUPPORTED;1073 1060 break; 1074 1061 … … 1076 1063 if (fImpersonated) 1077 1064 rc = vgsvcGstCtrlSessionHandleFileSeek(pSession, pHostCtx); 1078 else1079 rc = VERR_NOT_SUPPORTED;1080 1065 break; 1081 1066 … … 1083 1068 if (fImpersonated) 1084 1069 rc = vgsvcGstCtrlSessionHandleFileTell(pSession, pHostCtx); 1085 else1086 rc = VERR_NOT_SUPPORTED;1087 1070 break; 1088 1071 … … 1090 1073 if (fImpersonated) 1091 1074 rc = vgsvcGstCtrlSessionHandlePathRename(pSession, pHostCtx); 1092 else1093 rc = VERR_NOT_SUPPORTED;1094 1075 break; 1095 1076 … … 1097 1078 if (fImpersonated) 1098 1079 rc = vgsvcGstCtrlSessionHandlePathUserDocuments(pSession, pHostCtx); 1099 else1100 rc = VERR_NOT_SUPPORTED;1101 1080 break; 1102 1081 … … 1104 1083 if (fImpersonated) 1105 1084 rc = vgsvcGstCtrlSessionHandlePathUserHome(pSession, pHostCtx); 1106 else1107 rc = VERR_NOT_SUPPORTED;1108 1085 break; 1109 1086 1110 default: 1111 rc = VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID); 1112 VGSvcVerbose(3, "Unsupported message (uMsg=%RU32, cParms=%RU32) from host, skipping\n", uMsg, pHostCtx->uNumParms); 1087 default: /* Not supported, see next code block. */ 1113 1088 break; 1114 1089 } 1090 1091 if (rc == VERR_NOT_SUPPORTED) 1092 { 1093 VGSvcVerbose(3, "Unsupported message (uMsg=%RU32, cParms=%RU32) from host, skipping\n", uMsg, pHostCtx->uNumParms); 1094 1095 /* Tell the host service to skip the message. */ 1096 VbglR3GuestCtrlMsgSkip(pHostCtx->uClientID); 1097 1098 rc = VINF_SUCCESS; 1099 } 1100 /* Note: Other replies must be reported to the host service by the appropriate command handlers above. */ 1115 1101 1116 1102 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.