EXPORT_FORMAT_MINIMAL, /* also strip signature */
} arg_export_format = EXPORT_FORMAT_FULL;
-static const BusLocator home_mgr = {
- .destination = "org.freedesktop.home1",
- .path = "/org/freedesktop/home1",
- .interface = "org.freedesktop.home1.Manager",
-};
-
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra, json_variant_unrefp);
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra_this_machine, json_variant_unrefp);
STATIC_DESTRUCTOR_REGISTER(arg_identity_extra_privileged, json_variant_unrefp);
if (r < 0)
return r;
- r = bus_call_method(bus, &home_mgr, "ListHomes", &error, &reply, NULL);
+ r = bus_call_method(bus, bus_home_mgr, "ListHomes", &error, &reply, NULL);
if (r < 0)
return log_error_errno(r, "Failed to list homes: %s", bus_error_message(&error, r));
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ActivateHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ActivateHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "DeactivateHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "DeactivateHome");
if (r < 0)
return bus_log_create_error(r);
continue;
}
- r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", *i);
+ r = bus_call_method(bus, bus_home_mgr, "GetUserRecordByName", &error, &reply, "s", *i);
} else
- r = bus_call_method(bus, &home_mgr, "GetUserRecordByUID", &error, &reply, "u", (uint32_t) uid);
+ r = bus_call_method(bus, bus_home_mgr, "GetUserRecordByUID", &error, &reply, "u", (uint32_t) uid);
if (r < 0) {
log_error_errno(r, "Failed to inspect home: %s", bus_error_message(&error, r));
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "AuthenticateHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "AuthenticateHome");
if (r < 0)
return bus_log_create_error(r);
if (r < 0)
return r;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "CreateHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "CreateHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "RemoveHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "RemoveHome");
if (r < 0)
return bus_log_create_error(r);
if (!identity_properties_specified())
return log_error_errno(SYNTHETIC_ERRNO(EALREADY), "No field to change specified.");
- r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
+ r = bus_call_method(bus, bus_home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
if (r < 0)
return log_error_errno(r, "Failed to acquire user home record: %s", bus_error_message(&error, r));
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
_cleanup_free_ char *formatted = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "UpdateHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "UpdateHome");
if (r < 0)
return bus_log_create_error(r);
log_debug("Resizing");
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ResizeHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ResizeHome");
if (r < 0)
return bus_log_create_error(r);
log_debug("Propagating password");
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ChangePasswordHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ChangePasswordHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ResizeHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ResizeHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "LockHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "LockHome");
if (r < 0)
return bus_log_create_error(r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "UnlockHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "UnlockHome");
if (r < 0)
return bus_log_create_error(r);
return log_oom();
for (;;) {
- r = bus_message_new_method_call(bus, &m, &home_mgr, "AcquireHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "AcquireHome");
if (r < 0)
return bus_log_create_error(r);
}
}
- r = bus_call_method(bus, &home_mgr, "GetHomeByName", &error, &reply, "s", argv[1]);
+ r = bus_call_method(bus, bus_home_mgr, "GetHomeByName", &error, &reply, "s", argv[1]);
if (r < 0)
return log_error_errno(r, "Failed to inspect home: %s", bus_error_message(&error, r));
/* Close the fd that pings the home now. */
acquired_fd = safe_close(acquired_fd);
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ReleaseHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ReleaseHome");
if (r < 0)
return bus_log_create_error(r);
if (r < 0)
return r;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "LockAllHomes");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "LockAllHomes");
if (r < 0)
return bus_log_create_error(r);
#define USER_RECORD_IS_HOMED INT_TO_PTR(1)
#define USER_RECORD_IS_OTHER INT_TO_PTR(2)
-static const BusLocator home_mgr = {
- .destination = "org.freedesktop.home1",
- .path = "/org/freedesktop/home1",
- .interface = "org.freedesktop.home1.Manager",
-};
-
static int parse_argv(
pam_handle_t *handle,
int argc, const char **argv,
if (r != PAM_SUCCESS)
return r;
- r = bus_call_method(bus, &home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
+ r = bus_call_method(bus, bus_home_mgr, "GetUserRecordByName", &error, &reply, "s", username);
if (r < 0) {
if (sd_bus_error_has_name(&error, SD_BUS_ERROR_SERVICE_UNKNOWN) ||
sd_bus_error_has_name(&error, SD_BUS_ERROR_NAME_HAS_NO_OWNER)) {
}
}
- r = bus_message_new_method_call(bus, &m, &home_mgr, do_auth ? "AcquireHome" : "RefHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, do_auth ? "AcquireHome" : "RefHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
if (r != PAM_SUCCESS)
return r;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ReleaseHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ReleaseHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- r = bus_message_new_method_call(bus, &m, &home_mgr, "ChangePasswordHome");
+ r = bus_message_new_method_call(bus, &m, bus_home_mgr, "ChangePasswordHome");
if (r < 0)
return pam_bus_log_create_error(handle, r);