kcm: Check service registration errors
This commit is contained in:
12
kcm/main.c
12
kcm/main.c
@@ -92,15 +92,21 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (launchd_flag) {
|
if (launchd_flag) {
|
||||||
heim_sipc mach;
|
heim_sipc mach;
|
||||||
heim_sipc_launchd_mach_init(service_name, kcm_service, NULL, &mach);
|
ret = heim_sipc_launchd_mach_init(service_name, kcm_service, NULL, &mach);
|
||||||
|
if (ret)
|
||||||
|
krb5_err(kcm_context, 1, ret, "Could not setup launchd service");
|
||||||
} else {
|
} else {
|
||||||
heim_sipc un;
|
heim_sipc un;
|
||||||
heim_sipc_service_unix(service_name, kcm_service, NULL, &un);
|
ret = heim_sipc_service_unix(service_name, kcm_service, NULL, &un);
|
||||||
|
if (ret)
|
||||||
|
krb5_err(kcm_context, 1, ret, "Could not setup Unix domain socket service");
|
||||||
}
|
}
|
||||||
#ifdef HAVE_DOOR_CREATE
|
#ifdef HAVE_DOOR_CREATE
|
||||||
{
|
{
|
||||||
heim_sipc door;
|
heim_sipc door;
|
||||||
heim_sipc_service_door(service_name, kcm_service, NULL, &door);
|
ret = heim_sipc_service_door(service_name, kcm_service, NULL, &door);
|
||||||
|
if (ret)
|
||||||
|
krb5_err(kcm_context, 1, ret, "Could not setup door service");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user