VirtualBox

Changeset 98816 in vbox


Ignore:
Timestamp:
Mar 2, 2023 1:02:15 PM (21 months ago)
Author:
vboxsync
Message:

Guest Control: Added GuestFsObjData::FromGuestDirEntryEx(). bugref:9783

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r98792 r98816  
    847847
    848848#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS
     849    int FromGuestDirEntryEx(PCGSTCTLDIRENTRYEX pDirEntryEx, const Utf8Str &strUser = "", const Utf8Str &strGroups = "");
    849850    int FromGuestFsObjInfo(PCGSTCTLFSOBJINFO pFsObjInfo, const Utf8Str &strUser = "", const Utf8Str &strGroups = "",
    850851                           const void *pvACL = NULL, size_t cbACL = 0);
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r98789 r98816  
    132132#ifdef VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS
    133133/**
    134  * Set the file system object data from a given GSTCTLFSOBJINFO struct.
     134 * Sets the file system object data from a given GSTCTLDIRENTRYEX struct.
     135 *
     136 * @returns VBox status code.
     137 * @param   pDirEntryEx         Pointer to GSTCTLDIRENTRYEX struct to use.
     138 * @param   strUser             Resolved user name owning the object on the guest.
     139 * @param   strGroups           Resolved user group(s) the object on the guest is associated with.
     140 *                              On Windows there can be multiple groups assigned. The groups are separated with ";"
     141 *                              The first group found is always the primary group.
     142 */
     143int GuestFsObjData::FromGuestDirEntryEx(PCGSTCTLDIRENTRYEX pDirEntryEx, const Utf8Str &strUser /* = "" */, const Utf8Str &strGroups /* = "" */)
     144{
     145    mName = pDirEntryEx->szName;
     146
     147    return FromGuestFsObjInfo(&pDirEntryEx->Info, strUser, strGroups);
     148}
     149
     150/**
     151 * Sets the file system object data from a given GSTCTLFSOBJINFO struct.
    135152 *
    136153 * @returns VBox status code.
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