VirtualBox

Ignore:
Timestamp:
Oct 16, 2016 8:08:03 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111300
Message:

Additions: bugref:8622: Use crc of user name in name of ipc pipe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp

    r63089 r64285  
    3434#include <iprt/mem.h>
    3535#include <iprt/string.h>
     36#include <iprt/localipc.h>
    3637
    3738/* Required structures/defines of VBoxTray. */
     
    152153        if (RT_SUCCESS(rc))
    153154        {
    154             char szPipeName[255];
    155             if (RTStrPrintf(szPipeName, sizeof(szPipeName), "%s%s",
    156                             VBOXTRAY_IPC_PIPE_PREFIX, pszUserName))
     155            char szPipeName[80];
     156            size_t cbPipeName = sizeof(szPipeName);
     157            rc = RTLocalIpcMakeNameUniqueUser(VBOXTRAY_IPC_PIPE_PREFIX, pszUserName, szPipeName, &cbPipeName);
     158            if (RT_SUCCESS(rc))
    157159            {
    158160                rc = RTLocalIpcSessionConnect(phSession, szPipeName, 0 /* Flags */);
    159161            }
    160             else
    161                 rc = VERR_NO_MEMORY;
    162162
    163163            RTStrFree(pszUserName);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette