summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-bus/bus-common-errors.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-11-27 17:05:54 +0100
committerLennart Poettering <lennart@poettering.net>2024-02-14 15:04:15 +0100
commit336b1f1936ffbc62fa2cb189d8f86fbd982dcf15 (patch)
tree6a2c5959f775804cefb027482ce927fd8575b797 /src/libsystemd/sd-bus/bus-common-errors.c
parenthomed: add bus call that allows referencing a home without activating it (diff)
downloadsystemd-336b1f1936ffbc62fa2cb189d8f86fbd982dcf15.tar.xz
systemd-336b1f1936ffbc62fa2cb189d8f86fbd982dcf15.zip
homed: add a ActivateHomeIfReferenced() bus call
This is very similar to ActivateHome() but will fail if the home directory is not referenced yet. Or in other words, this doesn't add any new reference, but simply is the other side of RefUnrestricted(): if we allowed a home dir to be referenced without it actually being active, then this can catch up with things and activated what was previously referenced already. This also relaxes access rights to that users can always activate their own home dirs. This is useful once we allow user code to run without the home dir being activated.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-common-errors.c')
-rw-r--r--src/libsystemd/sd-bus/bus-common-errors.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-common-errors.c b/src/libsystemd/sd-bus/bus-common-errors.c
index efdd6539cc..e44795b1d3 100644
--- a/src/libsystemd/sd-bus/bus-common-errors.c
+++ b/src/libsystemd/sd-bus/bus-common-errors.c
@@ -147,6 +147,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = {
SD_BUS_ERROR_MAP(BUS_ERROR_HOME_CANT_AUTHENTICATE, EKEYREVOKED),
SD_BUS_ERROR_MAP(BUS_ERROR_HOME_IN_USE, EADDRINUSE),
SD_BUS_ERROR_MAP(BUS_ERROR_REBALANCE_NOT_NEEDED, EALREADY),
+ SD_BUS_ERROR_MAP(BUS_ERROR_HOME_NOT_REFERENCED, EBADR),
SD_BUS_ERROR_MAP_END
};