From: Daan De Meyer Date: Wed, 23 Apr 2025 10:06:16 +0000 (+0200) Subject: core: Merge forward declaration and definition of DynamicUser X-Git-Tag: v258-rc1~755^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d55c89690759e2e420da6834dece6274b35d23ad;p=thirdparty%2Fsystemd.git core: Merge forward declaration and definition of DynamicUser --- diff --git a/src/core/dynamic-user.h b/src/core/dynamic-user.h index 3e0074defbd..fe190cb864e 100644 --- a/src/core/dynamic-user.h +++ b/src/core/dynamic-user.h @@ -8,19 +8,12 @@ #include "fdset.h" #include "memory-util.h" -typedef struct DynamicUser DynamicUser; typedef struct Manager Manager; -typedef struct DynamicCreds { - /* A combination of a dynamic user and group */ - DynamicUser *user; - DynamicUser *group; -} DynamicCreds; - /* Note that this object always allocates a pair of user and group under the same name, even if one of them isn't * used. This means, if you want to allocate a group and user pair, and they might have two different names, then you * need to allocated two of these objects. DynamicCreds below makes that easy. */ -struct DynamicUser { +typedef struct DynamicUser { Manager *manager; unsigned n_ref; @@ -29,7 +22,13 @@ struct DynamicUser { int storage_socket[2]; char name[]; -}; +} DynamicUser; + +typedef struct DynamicCreds { + /* A combination of a dynamic user and group */ + DynamicUser *user; + DynamicUser *group; +} DynamicCreds; int dynamic_user_serialize(Manager *m, FILE *f, FDSet *fds); int dynamic_user_serialize_one(DynamicUser *d, const char *key, FILE *f, FDSet *fds);