diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-18 22:52:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-18 22:52:13 -0400 |
commit | 57e3375f83c09c21e1d68151425493112ae7ff66 (patch) | |
tree | eb4466e1ca55cc31e4aa6dfd238d3dab866df677 /src/core/unit.h | |
parent | 2ae0858e6c12018def32921e5d732395c74c4379 (diff) | |
parent | 6e32c03ed87e5dfd3857013e909e48b5e61564c1 (diff) |
Merge pull request #3865 from poettering/remove-ipc
add RemoveIPC= service file setting
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index a6c69938dd..53875653d7 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -180,6 +180,10 @@ struct Unit { /* Make sure we never enter endless loops with the check unneeded logic, or the BindsTo= logic */ RateLimit auto_stop_ratelimit; + /* Reference to a specific UID/GID */ + uid_t ref_uid; + gid_t ref_gid; + /* Cached unit file state and preset */ UnitFileState unit_file_state; int unit_file_preset; @@ -195,8 +199,6 @@ struct Unit { CGroupMask cgroup_members_mask; int cgroup_inotify_wd; - uint32_t cgroup_netclass_id; - /* How to start OnFailure units */ JobMode on_failure_job_mode; @@ -373,8 +375,7 @@ struct UnitVTable { /* Called whenever a process of this unit sends us a message */ void (*notify_message)(Unit *u, pid_t pid, char **tags, FDSet *fds); - /* Called whenever a name this Unit registered for comes or - * goes away. */ + /* Called whenever a name this Unit registered for comes or goes away. */ void (*bus_name_owner_change)(Unit *u, const char *name, const char *old_owner, const char *new_owner); /* Called for each property that is being set */ @@ -623,6 +624,17 @@ int unit_fail_if_symlink(Unit *u, const char* where); int unit_start_limit_test(Unit *u); +void unit_unref_uid(Unit *u, bool destroy_now); +int unit_ref_uid(Unit *u, uid_t uid, bool clean_ipc); + +void unit_unref_gid(Unit *u, bool destroy_now); +int unit_ref_gid(Unit *u, gid_t gid, bool clean_ipc); + +int unit_ref_uid_gid(Unit *u, uid_t uid, gid_t gid); +void unit_unref_uid_gid(Unit *u, bool destroy_now); + +void unit_notify_user_lookup(Unit *u, uid_t uid, gid_t gid); + /* Macros which append UNIT= or USER_UNIT= to the message */ #define log_unit_full(unit, level, error, ...) \ |