Changeset 93019 in vbox
- Timestamp:
- Dec 17, 2021 2:52:57 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149013
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/localipc.h
r82968 r93019 96 96 97 97 /** 98 * Grant the specified group access to the local IPC server socket. 99 * 100 * @returns IPRT status code. 101 * @param hServer The server handle. 102 * @param gid Group ID. 103 */ 104 RTDECL(int) RTLocalIpcServerGrantGroupAccess(RTLOCALIPCSERVER hServer, RTGID gid); 105 106 /** 98 107 * Listen for clients. 99 108 * -
trunk/include/iprt/mangling.h
r92507 r93019 1350 1350 # define RTLocalIpcServerCreate RT_MANGLER(RTLocalIpcServerCreate) 1351 1351 # define RTLocalIpcServerDestroy RT_MANGLER(RTLocalIpcServerDestroy) 1352 # define RTLocalIpcServerGrantGroupAccess RT_MANGLER(RTLocalIpcServerGrantGroupAccess) 1352 1353 # define RTLocalIpcServerCancel RT_MANGLER(RTLocalIpcServerCancel) 1353 1354 # define RTLocalIpcServerListen RT_MANGLER(RTLocalIpcServerListen) -
trunk/src/VBox/Runtime/r3/posix/localipc-posix.cpp
r92679 r93019 55 55 #include <signal.h> 56 56 #include <unistd.h> 57 #include <sys/stat.h> 57 58 58 59 #include "internal/magics.h" … … 270 271 Log(("RTLocalIpcServerCreate: failed, rc=%Rrc\n", rc)); 271 272 return rc; 273 } 274 275 276 277 RTDECL(int) RTLocalIpcServerGrantGroupAccess(RTLOCALIPCSERVER hServer, RTGID gid) 278 { 279 PRTLOCALIPCSERVERINT pThis = (PRTLOCALIPCSERVERINT)hServer; 280 281 AssertReturn(pThis, VERR_INVALID_PARAMETER); 282 AssertReturn(pThis->Name.sun_path, VERR_INVALID_PARAMETER); 283 284 if (chown(pThis->Name.sun_path, -1, gid) == 0) 285 { 286 if (chmod(pThis->Name.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == 0) 287 { 288 LogRel(("RTLocalIpcServerGrantGroupAccess: IPC socket %s access has been granted to group %RTgid\n", 289 pThis->Name.sun_path, gid)); 290 291 return VINF_SUCCESS; 292 } 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))); 296 } 297 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; 272 302 } 273 303 -
trunk/src/VBox/Runtime/r3/win/localipc-win.cpp
r86536 r93019 564 564 565 565 return rtLocalIpcServerReleaseAndUnlock(pThis); 566 } 567 568 569 RTDECL(int) RTLocalIpcServerGrantGroupAccess(RTLOCALIPCSERVER hServer, RTGID gid) 570 { 571 RT_NOREF_PV(hServer); RT_NOREF(gid); 572 return VERR_NOT_SUPPORTED; 566 573 } 567 574
Note:
See TracChangeset
for help on using the changeset viewer.