linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Return an error if the attribute requires authorization
@ 2011-03-23 19:40 Claudio Takahasi
  2011-03-23 19:40 ` [PATCH] TODO: Add item related to authorization and authentication Claudio Takahasi
  2011-03-24  9:20 ` [PATCH] Return an error if the attribute requires authorization Johan Hedberg
  0 siblings, 2 replies; 4+ messages in thread
From: Claudio Takahasi @ 2011-03-23 19:40 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

If an attribute requires authorization, Insuficient Authorization
will be returned by the attribute server until the Agent supports
a method to authorize attribute access.
---
 src/attrib-server.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/attrib-server.c b/src/attrib-server.c
index 9543da6..dc05d7e 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
@@ -173,6 +173,8 @@ static uint8_t att_check_reqs(struct gatt_channel *channel, uint8_t opcode,
 		channel->encrypted = g_attrib_is_encrypted(channel->attrib);
 	if (reqs == ATT_AUTHENTICATION && !channel->encrypted)
 		return ATT_ECODE_INSUFF_AUTHEN;
+	else if (reqs == ATT_AUTHORIZATION)
+		return ATT_ECODE_INSUFF_AUTHO;
 
 	switch (opcode) {
 	case ATT_OP_READ_BY_GROUP_REQ:
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-24  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 19:40 [PATCH] Return an error if the attribute requires authorization Claudio Takahasi
2011-03-23 19:40 ` [PATCH] TODO: Add item related to authorization and authentication Claudio Takahasi
2011-03-24  9:21   ` Johan Hedberg
2011-03-24  9:20 ` [PATCH] Return an error if the attribute requires authorization Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).