Permalink
Browse files

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

  • Loading branch information...
kaysievers committed Feb 24, 2014
1 parent a3be964 commit 95e3f12381a12b352c5c9afe94cdcabdf6a64388
Showing with 4 additions and 1 deletion.
  1. +3 −0 kdbus.h
  2. +1 −1 names.c
View
@@ -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
@@ -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;
}

0 comments on commit 95e3f12

Please sign in to comment.