Lines Matching defs:to
55 return log_error_errno(r, "Failed to allocate bus: %m");
59 return log_error_errno(r, "Failed to set bus name: %m");
63 return log_error_errno(r, "Failed to set address to connect to: %m");
67 return log_error_errno(r, "Failed to set FD negotiation: %m");
71 return log_error_errno(r, "Failed to set credential negotiation: %m");
98 return log_error_errno(r, "Failed to start bus client: %m");
112 return log_error_errno(r, "Failed to allocate bus: %m");
117 return log_error_errno(r, "Failed to set fds: %m");
126 return log_error_errno(r, "Failed to get server ID: %m");
130 return log_error_errno(r, "Failed to set server mode: %m");
134 return log_error_errno(r, "Failed to set FD negotiation: %m");
138 return log_error_errno(r, "Failed to set credential negotiation: %m");
142 return log_error_errno(r, "Failed to set anonymous authentication: %m");
148 return log_error_errno(r, "Failed to start bus client: %m");
157 return 0; /* make sure to continue processing it in further handlers */
175 return log_error_errno(r, "Failed to get unique name: %m");
191 return log_error_errno(r, "Failed to add match for NameLost: %m");
208 return log_error_errno(r, "Failed to add match for NameAcquired: %m");
221 log_error_errno(r, "Failed to add match for directed signals: %m");
222 /* FIXME: temporarily ignore error to support older kdbus versions */
314 /* no need to load legacy policy if destination is not kdbus */
349 return log_error("Unknown scope %s, don't know which policy to load. Refusing.", scope);
374 log_debug("Permitting access due to XML policy.");
394 return log_error_errno(fd, "Failed to get fd: %m");
398 return log_error_errno(events_destination, "Failed to get events mask: %m");
402 return log_error_errno(r, "Failed to get timeout: %m");
406 return log_error_errno(events_local, "Failed to get events mask: %m");
410 return log_error_errno(r, "Failed to get timeout: %m");
450 static int process_policy_unlocked(sd_bus *from, sd_bus *to, sd_bus_message *m, Policy *policy, const struct ucred *our_ucred, Set *owned_names) {
454 assert(to);
485 /* The message came from the kernel, and is sent to our legacy client. */
509 /* First check whether the sender can send the message to our name */
514 /* Return an error back to the caller */
522 if (to->is_kernel) {
534 /* The message came from the legacy client, and is sent to kdbus. */
536 r = bus_get_name_creds_kdbus(to, m->destination,
553 /* First check if we (the sender) can send to this name */
555 /* If we forward a signal from dbus-1 to kdbus, we have
559 * KDBUS_MSG_SIGNAL, so the kernel applies policies to
566 * name's policy we used, and to which unique ID it
568 * this to the kernel when sending the message, so that
570 * ID not map to each other anymore. */
585 /* Return an error back to the caller */
596 static int process_policy(sd_bus *from, sd_bus *to, sd_bus_message *m, SharedPolicy *sp, const struct ucred *our_ucred, Set *owned_names) {
603 r = process_policy_unlocked(from, to, m, policy, our_ucred, owned_names);
617 /* As reaction to hello we need to respond with two messages:
642 return log_error_errno(r, "Failed to generate HELLO reply: %m");
646 return log_error_errno(r, "Failed to append unique name to HELLO reply: %m");
650 return log_error_errno(r, "Failed to append sender to HELLO reply: %m");
654 return log_error_errno(r, "Failed to seal HELLO reply: %m");
658 return log_error_errno(r, "Failed to send HELLO reply: %m");
668 return log_error_errno(r, "Failed to allocate initial NameAcquired message: %m");
672 return log_error_errno(r, "Failed to append unique name to NameAcquired message: %m");
676 return log_error_errno(r, "Failed to append sender to NameAcquired message: %m");
680 return log_error_errno(r, "Failed to set destination for NameAcquired message: %m");
684 return log_error_errno(r, "Failed to seal NameAcquired message: %m");
688 return log_error_errno(r, "Failed to send NameAcquired message: %m");
731 * Usually, we would just take any message that the bus passes to us
732 * and forward it to the local connection. However, there are actually
734 * subscribe to. Therefore, we actually emulate a real broadcast
750 log_error_errno(r, "Failed to process destination bus: %m");
766 return log_error_errno(r, "Failed to synthesize message: %m");
784 return log_error_errno(r, "Failed to process policy: %m");
794 /* If the peer tries to send a reply and it is
799 * dbus1, but not in kdbus. We don't want to track
803 * dropped. However, this is equivalent to the
804 * caller's timeout to expire, so this should be
812 /* Return the error to the client, if we can */
813 synthetic_reply_method_errnof(m, r, "Failed to forward message we got from destination: %m");
817 log_error("Dropped messages due to queue overflow of local peer (pid: "PID_FMT" uid: "UID_FMT")", p->local_creds.pid, p->local_creds.uid);
821 "Failed to forward message we got from destination: uid=" UID_FMT " gid=" GID_FMT" message=%s destination=%s path=%s interface=%s member=%s: %m",
842 log_error_errno(r, "Failed to process local bus: %m");
858 return log_error_errno(r, "Failed to process HELLO: %m");
866 return log_error_errno(r, "Failed to process driver calls: %m");
876 return log_error_errno(r, "Failed to process policy: %m");
894 synthetic_reply_method_errnof(m, r, "Failed to forward message we got from local: %m");
896 "Failed to forward message we got from local: uid=" UID_FMT " gid=" GID_FMT" message=%s destination=%s path=%s interface=%s member=%s: %m",
912 return 0; /* make sure to continue processing it in further handlers */
924 /* Read messages from bus, to pass them on to our client */
934 /* Read messages from our client, to pass them on to the bus */