SUPR3HardenedIPRT.cpp revision c58f1213e628a545081c70e26c6b67a841cff880
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * VirtualBox Support Library - Hardened Support Routines using IPRT.
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2011 Oracle Corporation
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * available from http://www.virtualbox.org. This file is free software;
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * General Public License (GPL) as published by the Free Software
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * The contents of this file may alternatively be used under the terms
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * of the Common Development and Distribution License Version 1.0
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * VirtualBox OSE distribution, in which case the provisions of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * CDDL are applicable instead of those of the GPL.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * You may elect to license modified versions of this file under the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * terms and conditions of either the GPL or the CDDL or both.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync/*******************************************************************************
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync* Header Files *
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync*******************************************************************************/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * @copydoc RTPathFilename
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(char *) supR3HardenedPathFilename(const char *pszPath)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * @copydoc RTPathAppPrivateNoArch
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * @copydoc RTPathAppPrivateArch
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * @copydoc RTPathSharedLibs
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(int) supR3HardenedPathSharedLibs(char *pszPath, size_t cchPath)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync * @copydoc RTPathAppDocs
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath)
c77e7bff89c7639353778366984d51ff165ea0e3vboxsync * @copydoc RTPathExecDir
c77e7bff89c7639353778366984d51ff165ea0e3vboxsyncDECLHIDDEN(int) supR3HardenedPathExecDir(char *pszPath, size_t cchPath)
501e3e846528298f82146d5afa36830a3f9b1267vboxsyncDECLHIDDEN(void) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, va_list va)
501e3e846528298f82146d5afa36830a3f9b1267vboxsync AssertFatalMsgFailed(("%s (rc=%Rrc): %N", pszWhere, rc, pszMsgFmt, &vaCopy));
501e3e846528298f82146d5afa36830a3f9b1267vboxsyncDECLHIDDEN(void) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, const char *pszMsgFmt, ...)
501e3e846528298f82146d5afa36830a3f9b1267vboxsync supR3HardenedFatalMsgV(pszWhere, enmWhat, rc, pszMsgFmt, va);
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(void) supR3HardenedFatalV(const char *pszFormat, va_list va)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(void) supR3HardenedFatal(const char *pszFormat, ...)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va)
be9fcc1751f2ee5d873be8510fed59aad8f39a19vboxsync AssertLogRelMsgFailed(("%N", pszFormat, &vaCopy)); /** @todo figure out why this ain't working, or at seems to be that way... */
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncDECLHIDDEN(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...)