Changeset 39091 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Oct 24, 2011 1:58:22 PM (13 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLibSem.cpp
r33167 r39091 52 52 DECLINLINE(int) supSemOp2(PSUPDRVSESSION pSession, uint32_t uType, uintptr_t hSem, uint32_t uOp, uint64_t u64Arg) 53 53 { 54 NOREF(pSession); 54 55 SUPSEMOP2 Req; 55 56 Req.Hdr.u32Cookie = g_u32Cookie; … … 86 87 DECLINLINE(int) supSemOp3(PSUPDRVSESSION pSession, uint32_t uType, uintptr_t hSem, uint32_t uOp, PSUPSEMOP3 pReq) 87 88 { 89 NOREF(pSession); 88 90 pReq->Hdr.u32Cookie = g_u32Cookie; 89 91 pReq->Hdr.u32SessionCookie = g_u32SessionCookie; -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp
r28800 r39091 101 101 AssertFatalMsgFailed(("%s (rc=%Rrc): %N", pszWhere, rc, pszMsgFmt, &vaCopy)); 102 102 va_end(vaCopy); 103 NOREF(enmWhat); 103 104 } 104 105 -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
r39086 r39091 814 814 } 815 815 816 #ifdef SOME_UNUSED_FUNCTION 816 817 817 818 /** … … 844 845 } 845 846 847 #endif /* SOME_UNUSED_FUNCTION */ 846 848 847 849 /** … … 1188 1190 full access. So, to work around we relax the hardening a bit and 1189 1191 permit grand parents and beyond to be group writable by admin. */ 1190 if (!fRelaxed || pFsObjState->Stat.st_gid != 80 /*admin*/) /** @todo dynamically resolve the admin group? */ 1192 bool fBad = !fRelaxed || pFsObjState->Stat.st_gid != 80 /*admin*/; /** @todo dynamically resolve the admin group? */ 1193 1191 1194 #elif defined(RT_OS_FREEBSD) 1192 1195 /* HACK ALERT: PC-BSD 9 has group-writable application directory, … … 1197 1200 * details would be greatly appreciated as this HACK affects real FreeBSD 1198 1201 * as well as the PC-BSD fork! */ 1199 if (pFsObjState->Stat.st_gid != 5 /*operator*/) 1202 bool fBad = pFsObjState->Stat.st_gid != 5 /*operator*/; 1203 NOREF(fRelaxed); 1204 #else 1205 NOREF(fRelaxed); 1206 bool fBad = true; 1200 1207 #endif 1208 if (fBad) 1201 1209 return supR3HardenedSetError3(VERR_SUPLIB_WRITE_NON_SYS_GROUP, pErrInfo, 1202 1210 "The group is not a system group and it has write access to '", pszPath, "'"); … … 1217 1225 return VINF_SUCCESS; 1218 1226 #endif 1219 1220 1227 } 1221 1228 -
trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
r37596 r39091 173 173 { 174 174 AssertMsg(pThis->hDevice != (intptr_t)NIL_RTFILE, ("SUPLIB not initiated successfully!\n")); 175 NOREF(cbReq); 175 176 176 177 /* … … 245 246 int suplibOsPageFree(PSUPLIBDATA pThis, void *pvPages, size_t cPages) 246 247 { 248 NOREF(pThis); 247 249 munmap(pvPages, cPages << PAGE_SHIFT); 248 250 return VINF_SUCCESS; -
trunk/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp
r38636 r39091 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 32 32 #include <VBox/err.h> 33 33 #include <iprt/initterm.h> 34 #include <iprt/ stream.h>34 #include <iprt/message.h> 35 35 36 36 … … 38 38 { 39 39 RTR3InitExeNoArguments(0); 40 if (argc != 1) 41 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "This utility takes no arguments"); 42 NOREF(argv); 43 40 44 int rc = SUPR3Install(); 41 45 if (RT_SUCCESS(rc)) 42 46 { 43 RT Printf("installed successfully\n");44 return 0;47 RTMsgInfo("installed successfully"); 48 return RTEXITCODE_SUCCESS; 45 49 } 46 RTPrintf("installation failed. rc=%Rrc\n", rc); 47 return 1; 50 return RTMsgErrorExit(RTEXITCODE_FAILURE, "installation failed. rc=%Rrc", rc); 48 51 } 49 52 -
trunk/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp
r38636 r39091 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include <iprt/initterm.h> 34 34 #include <iprt/stream.h> 35 #include <iprt/message.h> 35 36 36 37 … … 38 39 { 39 40 RTR3InitExeNoArguments(0); 41 if (argc != 1) 42 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "This utility takes no arguments\n"); 43 NOREF(argv); 44 40 45 int rc = SUPR3Uninstall(); 41 46 if (RT_SUCCESS(rc)) 42 47 { 43 RT Printf("uninstalled successfully\n");44 return 0;48 RTMsgInfo("uninstalled successfully"); 49 return RTEXITCODE_SUCCESS; 45 50 } 46 RTPrintf("uninstallation failed. rc=%Rrc\n", rc); 47 return 1; 51 return RTMsgErrorExit(RTEXITCODE_FAILURE, "uninstallation failed. rc=%Rrc", rc); 48 52 } 49 53
Note:
See TracChangeset
for help on using the changeset viewer.