Changeset 98813 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Mar 2, 2023 12:20:41 PM (21 months ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp
r98804 r98813 2281 2281 * @param pszGroups Associated user groups as a string. 2282 2282 * Multiple groups are delimited by "\r\n", whereas the first group always is the primary group. 2283 * @param pvACL ACL block to send.2284 * @param cbACL Size (in bytes) of ACL block to send.2285 2283 */ 2286 2284 VBGLR3DECL(int) VbglR3GuestCtrlDirCbReadEx(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, PGSTCTLDIRENTRYEX pEntry, uint32_t cbSize, 2287 char *pszUser, char *pszGroups , void *pvACL, size_t cbACL)2285 char *pszUser, char *pszGroups) 2288 2286 { 2289 2287 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 2290 2288 AssertPtrReturn(pszUser, VERR_INVALID_POINTER); 2291 2289 AssertPtrReturn(pszGroups, VERR_INVALID_POINTER); 2292 AssertPtrReturn(pvACL, VERR_INVALID_POINTER);2293 AssertReturn(cbACL, VERR_INVALID_PARAMETER);2294 2290 2295 2291 HGCMReplyDirNotify Msg; 2296 VBGL_HGCM_HDR_INIT(&Msg.reply_hdr.hdr, pCtx->uClientID, GUEST_MSG_DIR_NOTIFY, GSTCTL_HGCM_REPLY_HDR_PARMS + 4);2292 VBGL_HGCM_HDR_INIT(&Msg.reply_hdr.hdr, pCtx->uClientID, GUEST_MSG_DIR_NOTIFY, GSTCTL_HGCM_REPLY_HDR_PARMS + 3); 2297 2293 VbglHGCMParmUInt32Set(&Msg.reply_hdr.context, pCtx->uContextID); 2298 2294 VbglHGCMParmUInt32Set(&Msg.reply_hdr.type, GUEST_DIR_NOTIFYTYPE_READ); … … 2302 2298 VbglHGCMParmPtrSetString(&Msg.u.read.user, pszUser); 2303 2299 VbglHGCMParmPtrSetString(&Msg.u.read.groups, pszGroups); 2304 VbglHGCMParmPtrSet (&Msg.u.read.acl, pvACL, (uint32_t)cbACL);2305 2300 2306 2301 return VbglR3HGCMCall(&Msg.reply_hdr.hdr, RT_UOFFSET_AFTER(HGCMReplyDirNotify, u.read)); … … 2322 2317 { 2323 2318 char szIgnored[1] = { 0 }; 2324 return VbglR3GuestCtrlDirCbReadEx(pCtx, uRc, pEntry, cbSize, szIgnored /* pszUser */, szIgnored /* pszGroups */, 2325 szIgnored /* pvACL */, sizeof(szIgnored) /* cbACL */); 2319 return VbglR3GuestCtrlDirCbReadEx(pCtx, uRc, pEntry, cbSize, szIgnored /* pszUser */, szIgnored /* pszGroups */); 2326 2320 } 2327 2321 … … 2605 2599 * @param pszGroups Associated user groups as a string. 2606 2600 * Multiple groups are delimited by "\r\n", whereas the first group always is the primary group. 2607 * @param pvACL ACL block to send.2608 * @param cbACL Size (in bytes) of ACL block to send.2609 2601 */ 2610 2602 VBGLR3DECL(int) VbglR3GuestCtrlFsCbQueryInfoEx(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, PGSTCTLFSOBJINFO pFsObjInfo, 2611 char *pszUser, char *pszGroups , void *pvACL, uint32_t cbACL)2603 char *pszUser, char *pszGroups) 2612 2604 { 2613 2605 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); … … 2615 2607 AssertPtrReturn(pszUser, VERR_INVALID_POINTER); 2616 2608 AssertPtrReturn(pszGroups, VERR_INVALID_POINTER); 2617 AssertPtrReturn(pvACL, VERR_INVALID_POINTER);2618 AssertReturn(cbACL, VERR_INVALID_PARAMETER);2619 2609 2620 2610 HGCMReplyFsNotify Msg; 2621 VBGL_HGCM_HDR_INIT(&Msg.reply_hdr.hdr, pCtx->uClientID, GUEST_MSG_FS_NOTIFY, 7);2611 VBGL_HGCM_HDR_INIT(&Msg.reply_hdr.hdr, pCtx->uClientID, GUEST_MSG_FS_NOTIFY, GSTCTL_HGCM_REPLY_HDR_PARMS + 3); 2622 2612 VbglHGCMParmUInt32Set(&Msg.reply_hdr.context, pCtx->uContextID); 2623 2613 VbglHGCMParmUInt32Set(&Msg.reply_hdr.type, GUEST_FS_NOTIFYTYPE_QUERY_INFO); 2624 2614 VbglHGCMParmUInt32Set(&Msg.reply_hdr.rc, uRc); 2615 2625 2616 VbglHGCMParmPtrSet (&Msg.u.queryinfo.obj_info, pFsObjInfo, sizeof(GSTCTLFSOBJINFO)); 2626 2617 VbglHGCMParmPtrSetString(&Msg.u.queryinfo.user, pszUser); 2627 2618 VbglHGCMParmPtrSetString(&Msg.u.queryinfo.groups, pszGroups); 2628 VbglHGCMParmPtrSet (&Msg.u.queryinfo.acl, pvACL, cbACL);2629 2619 2630 2620 return VbglR3HGCMCall(&Msg.reply_hdr.hdr, RT_UOFFSET_AFTER(HGCMReplyFsNotify, u.queryinfo)); … … 2643 2633 { 2644 2634 char szIgnored[1]; 2645 return VbglR3GuestCtrlFsCbQueryInfoEx(pCtx, uRc, pFsObjInfo, szIgnored /* pszUser */, szIgnored /* pszGroups */, 2646 szIgnored /* pvACL */, sizeof(szIgnored) /* cbACL */); 2635 return VbglR3GuestCtrlFsCbQueryInfoEx(pCtx, uRc, pFsObjInfo, szIgnored /* pszUser */, szIgnored /* pszGroups */); 2647 2636 } 2648 2637 … … 2663 2652 2664 2653 HGCMReplyFsNotify Msg; 2665 VBGL_HGCM_HDR_INIT(&Msg.reply_hdr.hdr, pCtx->uClientID, GUEST_MSG_FS_NOTIFY, 4);2654 VBGL_HGCM_HDR_INIT(&Msg.reply_hdr.hdr, pCtx->uClientID, GUEST_MSG_FS_NOTIFY, GSTCTL_HGCM_REPLY_HDR_PARMS + 1); 2666 2655 VbglHGCMParmUInt32Set(&Msg.reply_hdr.context, pCtx->uContextID); 2667 2656 VbglHGCMParmUInt32Set(&Msg.reply_hdr.type, GUEST_FS_NOTIFYTYPE_CREATE_TEMP); 2668 2657 VbglHGCMParmUInt32Set(&Msg.reply_hdr.rc, uRc); 2658 2669 2659 VbglHGCMParmPtrSetString(&Msg.u.createtemp.path, pszPath); 2670 2660 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r98791 r98813 1185 1185 pszGroup ? pszGroup : "", DirEntryEx.Info.Attr.u.UnixGroup.gid); 1186 1186 1187 char szIgnored[] = "???"; /** @todo Implement ACL support. */1187 char szIgnored[] = "???"; 1188 1188 int rc2 = VbglR3GuestCtrlDirCbReadEx(pHostCtx, rc, 1189 1189 &DirEntryEx, (uint32_t)(sizeof(GSTCTLDIRENTRYEX) + cbDirEntry), 1190 pszUser ? pszUser : szIgnored, pszGroup ? pszGroup : szIgnored, 1191 szIgnored /* pvACL */, sizeof(szIgnored) /* cbACL */); 1190 pszUser ? pszUser : szIgnored, pszGroup ? pszGroup : szIgnored); 1192 1191 RTStrFree(pszUser); 1193 1192 RTStrFree(pszGroup); … … 1870 1869 AssertStmt(pszGroup != NULL, rc = VERR_NO_MEMORY); 1871 1870 1872 char szNotImplemented[] = "<not-implemented>"; /** @todo Implement ACL support. */ 1873 int rc2 = VbglR3GuestCtrlFsCbQueryInfoEx(pHostCtx, rc, pObjInfo, pszUser, pszGroup, 1874 szNotImplemented, sizeof(szNotImplemented)); 1871 int rc2 = VbglR3GuestCtrlFsCbQueryInfoEx(pHostCtx, rc, pObjInfo, pszUser, pszGroup); 1875 1872 RTStrFree(pszUser); 1876 1873 RTStrFree(pszGroup);
Note:
See TracChangeset
for help on using the changeset viewer.