diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-10-18 13:59:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-10-18 22:45:19 +0200 |
commit | a74e2e447fde027b74ca9768a0c27d3408b95dac (patch) | |
tree | 8f13745e8c2a520f7ee31224d9307709982bdcad /src/home/homework-cifs.h | |
parent | 4e660eca4543a6e34399577958e4a6c113cbb04d (diff) | |
download | systemd-a74e2e447fde027b74ca9768a0c27d3408b95dac.tar.gz |
homework: move allocation/destruction into outer/generic scope
Previously in most cases we'd allocate the HomeSetup context object
in generic code in homework.c. But for some cases we allocated them
instead inside the specific code in homework-{cifs,directory,luks}.c
Let's clean that up, and systematically allocate it in the outer
"entrypoint" calls in homework.c instead of the inner ones.
This doesn't change much in behaviour (i.e. it just means when something
fails we'll now clean it up one stack frame further up). But it will
allow is to more easily work with the context objects, since we'll have
them around in all stack frames.
Diffstat (limited to 'src/home/homework-cifs.h')
-rw-r--r-- | src/home/homework-cifs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/home/homework-cifs.h b/src/home/homework-cifs.h index 820b95e1db..dda1e0b876 100644 --- a/src/home/homework-cifs.h +++ b/src/home/homework-cifs.h @@ -6,6 +6,6 @@ int home_setup_cifs(UserRecord *h, HomeSetupFlags flags, HomeSetup *setup); -int home_activate_cifs(UserRecord *h, PasswordCache *cache, UserRecord **ret_home); +int home_activate_cifs(UserRecord *h, HomeSetup *setup, PasswordCache *cache, UserRecord **ret_home); -int home_create_cifs(UserRecord *h, UserRecord **ret_home); +int home_create_cifs(UserRecord *h, HomeSetup *setup, UserRecord **ret_home); |