summaryrefslogtreecommitdiff
path: root/init/service_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'init/service_utils.h')
-rw-r--r--init/service_utils.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/init/service_utils.h b/init/service_utils.h
index 365cb298b..befce253a 100644
--- a/init/service_utils.h
+++ b/init/service_utils.h
@@ -29,6 +29,25 @@
namespace android {
namespace init {
+struct SocketDescriptor {
+ std::string name;
+ int type = 0;
+ uid_t uid = 0;
+ gid_t gid = 0;
+ int perm = 0;
+ std::string context;
+ bool passcred = false;
+
+ Result<void> CreateAndPublish(const std::string& global_context) const;
+};
+
+struct FileDescriptor {
+ std::string name;
+ std::string type;
+
+ Result<void> CreateAndPublish() const;
+};
+
struct NamespaceInfo {
int flags;
// Pair of namespace type, path to name.