]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
user-record: Allow/strip status for mask/extract privileged helpers
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 23 Mar 2025 21:52:10 +0000 (22:52 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 24 Mar 2025 10:36:16 +0000 (11:36 +0100)
If we're using these helpers, we want to split a user record into two,
one with the privileged section, and one without. This should work even
when the user record has a "status" section, so adapt the helpers to
account for that.

src/shared/user-record.h

index 139651714b013de0b138ea65cf4ff7ee21857e57..75f50ae347ea45db371ef0539dbf5baf635788ba 100644 (file)
@@ -136,12 +136,14 @@ typedef enum UserRecordLoadFlags {
                                            USER_RECORD_STRIP_PRIVILEGED|
                                            USER_RECORD_ALLOW_PER_MACHINE|
                                            USER_RECORD_ALLOW_BINDING|
+                                           USER_RECORD_ALLOW_STATUS|
                                            USER_RECORD_ALLOW_SIGNATURE,
 
         USER_RECORD_EXTRACT_PRIVILEGED   = USER_RECORD_STRIP_REGULAR|
                                            USER_RECORD_ALLOW_PRIVILEGED|
                                            USER_RECORD_STRIP_PER_MACHINE|
                                            USER_RECORD_STRIP_BINDING|
+                                           USER_RECORD_STRIP_STATUS|
                                            USER_RECORD_STRIP_SIGNATURE,
 
         /* Whether to log about loader errors beyond LOG_DEBUG */