VirtualBox

Changeset 93026 in vbox for trunk/src


Ignore:
Timestamp:
Dec 19, 2021 10:50:51 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/LocalIpc/posix: Fixed incorrect handle and state validation. Sigh2 bugref:10134

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/localipc-posix.cpp

    r93025 r93026  
    277277{
    278278    PRTLOCALIPCSERVERINT pThis = (PRTLOCALIPCSERVERINT)hServer;
    279     AssertReturn(pThis,                VERR_INVALID_PARAMETER);
    280     AssertReturn(pThis->Name.sun_path, VERR_INVALID_PARAMETER);
     279    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     280    AssertReturn(pThis->u32Magic == RTLOCALIPCSERVER_MAGIC, VERR_INVALID_HANDLE);
     281    AssertReturn(pThis->Name.sun_path[0] != '\0', VERR_INVALID_STATE);
    281282
    282283    if (chown(pThis->Name.sun_path, -1, gid) == 0)
     
    284285        if (chmod(pThis->Name.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == 0)
    285286        {
    286             Log2Rel(("RTLocalIpcServerGrantGroupAccess: IPC socket %s access has been granted to group %RTgid\n",
     287            LogRel2(("RTLocalIpcServerGrantGroupAccess: IPC socket %s access has been granted to group %RTgid\n",
    287288                     pThis->Name.sun_path, gid));
    288289            return VINF_SUCCESS;
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