VirtualBox

Changeset 93025 in vbox for trunk


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

IPRT/LocalIpc/poisx: How difficult can this be to get right? bugref:10134

File:
1 edited

Legend:

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

    r93019 r93025  
    274274
    275275
    276 
    277276RTDECL(int) RTLocalIpcServerGrantGroupAccess(RTLOCALIPCSERVER hServer, RTGID gid)
    278277{
    279278    PRTLOCALIPCSERVERINT pThis = (PRTLOCALIPCSERVERINT)hServer;
    280 
    281279    AssertReturn(pThis,                VERR_INVALID_PARAMETER);
    282280    AssertReturn(pThis->Name.sun_path, VERR_INVALID_PARAMETER);
     
    286284        if (chmod(pThis->Name.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == 0)
    287285        {
    288             LogRel(("RTLocalIpcServerGrantGroupAccess: IPC socket %s access has been granted to group %RTgid\n",
    289                     pThis->Name.sun_path, gid));
    290 
     286            Log2Rel(("RTLocalIpcServerGrantGroupAccess: IPC socket %s access has been granted to group %RTgid\n",
     287                     pThis->Name.sun_path, gid));
    291288            return VINF_SUCCESS;
    292289        }
    293         else
    294             LogRel(("RTLocalIpcServerGrantGroupAccess: cannot grant IPC socket %s write permission to group %RTgid, rc=%Rrc\n",
    295                     pThis->Name.sun_path, gid, RTErrConvertFromErrno(errno)));
     290        LogRel(("RTLocalIpcServerGrantGroupAccess: cannot grant IPC socket %s write permission to group %RTgid: errno=%d\n",
     291                pThis->Name.sun_path, gid, errno));
    296292    }
    297293    else
    298         LogRel(("RTLocalIpcServerGrantGroupAccess: cannot change IPC socket %s group ownership to %RTgid, rc=%Rrc\n",
    299                 pThis->Name.sun_path, gid, RTErrConvertFromErrno(errno)));
    300 
    301     return VERR_ACCESS_DENIED;
     294        LogRel(("RTLocalIpcServerGrantGroupAccess: cannot change IPC socket %s group ownership to %RTgid: errno=%d\n",
     295                pThis->Name.sun_path, gid, errno));
     296    return RTErrConvertFromErrno(errno);
    302297}
    303298
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