]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Merge forward declaration and definition of DynamicUser 37224/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 23 Apr 2025 10:06:16 +0000 (12:06 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 23 Apr 2025 11:48:48 +0000 (13:48 +0200)
src/core/dynamic-user.h

index 3e0074defbdde700bbb792455889454d85051c17..fe190cb864ecfa67c3bc4dc83c2bae54d427dd3a 100644 (file)
@@ -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);