23 #ifndef MOUNTOWNERDETAILS_H
24 #define MOUNTOWNERDETAILS_H
26 #include "MountProperties.h"
28 #include <RdkPluginBase.h>
30 #include <sys/types.h>
57 const uid_t& defaultUserId,
58 const gid_t& defaultGroupId,
59 const std::shared_ptr<DobbyRdkPluginUtils> &utils);
65 bool getOwnerIds(uid_t& userId, gid_t& groupId)
const;
68 bool changeOwner(
const std::string& path, uid_t userId, gid_t groupId)
const;
70 const std::string mRootfsPath;
73 gid_t mDefaultGroupId;
74 const std::shared_ptr<DobbyRdkPluginUtils> mUtils;
Class that represents mount ownership and whether to apply recursively.
Definition: MountOwnerDetails.h:44
bool getOwnerIds(uid_t &userId, gid_t &groupId) const
Get user and group IDs based on their configured.
Definition: MountOwnerDetails.cpp:102
bool changeOwnerRecursive(const std::string &path, uid_t userId, gid_t groupId) const
Change ownership recursively from the given path.
Definition: MountOwnerDetails.cpp:194
bool onCreateRuntime() const
Changes ownership of mount source according to MountOwnerProperties during the createRuntime hook.
Definition: MountOwnerDetails.cpp:73
bool changeOwner(const std::string &path, uid_t userId, gid_t groupId) const
Change ownership of mount according to properties structure.
Definition: MountOwnerDetails.cpp:231
bool processOwners() const
Process individual mount owner and change ownership either singularly or recursively.
Definition: MountOwnerDetails.cpp:154
Dobby RDK Storage Plugin.
Definition: Storage.h:45
MountOwnerProperties struct used for Storage plugin.
Definition: MountProperties.h:63