Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

names: return -EINVAL if an activator tries to request a second name

  • Loading branch information...
commit 95e3f12381a12b352c5c9afe94cdcabdf6a64388 1 parent a3be964
@kaysievers kaysievers authored
Showing with 4 additions and 1 deletion.
  1. +3 −0  kdbus.h
  2. +1 −1  names.c
View
3  kdbus.h
@@ -891,6 +891,9 @@ enum kdbus_ioctl_type {
* @EADDRNOTAVAIL: A message flagged not to activate a service, addressed
* a service which is not currently running.
* @EAGAIN: No messages are queued at the moment.
+ * @EALREADY: A requested name is already owned by the connection,
+ * a connection is already disconnected, memfd is already
+ * sealed or has the requested size.
* @EBADF: File descriptors passed with the message are not valid.
* @EBADFD: A bus connection is in a corrupted state.
* @EBADMSG: Passed data contains a combination of conflicting or
View
2  names.c
@@ -404,7 +404,7 @@ int kdbus_name_acquire(struct kdbus_name_registry *reg,
/* an activator can only own a single name */
if ((conn->flags & KDBUS_HELLO_ACTIVATOR) && conn->names > 0) {
- ret = -EALREADY;
+ ret = -EINVAL;
goto exit_unlock;
}
Please sign in to comment.
Something went wrong with that request. Please try again.