Linux bluetooth development
 help / color / mirror / Atom feed
* [Bluez-users] Socket permissions
@ 2004-03-01 15:48 Thor Egil Skaug
  2004-03-01 16:00 ` TM
  2004-03-01 16:17 ` Marcel Holtmann
  0 siblings, 2 replies; 5+ messages in thread
From: Thor Egil Skaug @ 2004-03-01 15:48 UTC (permalink / raw)
  To: 'BlueZ Mailing List'

When I use the hciconfig, hcitool, etc. applications that depend on
raw-data hci-sockets,
I have to be logged in as root for it to work. If not I get a permission
denied error.

Which files do I have to alter permissions on in order for a normal user
to do this?

I am using Linux 2.4.25, hci_usb + usb-uhci, Belkin USB dongle (CSR).

Thor


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Socket permissions
  2004-03-01 15:48 [Bluez-users] Socket permissions Thor Egil Skaug
@ 2004-03-01 16:00 ` TM
  2004-03-01 16:13   ` Thor Egil Skaug
  2004-03-01 16:17 ` Marcel Holtmann
  1 sibling, 1 reply; 5+ messages in thread
From: TM @ 2004-03-01 16:00 UTC (permalink / raw)
  To: bluez-users

I did 
# chown root hciconfig
# chmod 4711 hciconfig 

which sets that program setUID root. This should solve that problem, but setting programs setuid root *could* cause a problem for security. Since all my bluez stuff is on a laptop that's rarely online, the risk is negligible for me.

-t.

Thor Egil Skaug wrote:
> When I use the hciconfig, hcitool, etc. applications that depend on
> raw-data hci-sockets,
> I have to be logged in as root for it to work. If not I get a permission
> denied error.
> 
> Which files do I have to alter permissions on in order for a normal user
> to do this?
> 
> I am using Linux 2.4.25, hci_usb + usb-uhci, Belkin USB dongle (CSR).
> 
> Thor
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* RE: [Bluez-users] Socket permissions
  2004-03-01 16:00 ` TM
@ 2004-03-01 16:13   ` Thor Egil Skaug
  0 siblings, 0 replies; 5+ messages in thread
From: Thor Egil Skaug @ 2004-03-01 16:13 UTC (permalink / raw)
  To: 'TM', bluez-users

>I did 
># chown root hciconfig
># chmod 4711 hciconfig 
>
>which sets that program setUID root. This should solve that problem,
but setting programs setuid root *could* cause a problem for security.
Since all my bluez stuff is on a laptop that's rarely online, the risk
is negligible for me.
>
>-t.

Thanks, but this is not what I meant. The application that I am writing
(using raw-data hci sockets) should not require any
different permissions or owner. What I am looking for is a way to let a
normal user run my application that has normal permissions and
open a BlueZ hci socket.

An example is using the serial port in an application. To allow users to
run such a program, one would have to set permissions
on /dev/ttyS*.

Thor


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Socket permissions
  2004-03-01 15:48 [Bluez-users] Socket permissions Thor Egil Skaug
  2004-03-01 16:00 ` TM
@ 2004-03-01 16:17 ` Marcel Holtmann
  1 sibling, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2004-03-01 16:17 UTC (permalink / raw)
  To: Thor Egil Skaug; +Cc: 'BlueZ Mailing List'

Hi Thor,

> When I use the hciconfig, hcitool, etc. applications that depend on
> raw-data hci-sockets,
> I have to be logged in as root for it to work. If not I get a permission
> denied error.
> 
> Which files do I have to alter permissions on in order for a normal user
> to do this?

there is a limited number of commands and events that are accessable to
everybody. There are no file permissions to change this, because it
depends on CAP_NET_ADMIN rights.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Socket permissions
       [not found] <BAY1-F110eiS609lcQt00003ec7@hotmail.com>
@ 2004-03-01 17:27 ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2004-03-01 17:27 UTC (permalink / raw)
  To: Thor Egil Skaug; +Cc: BlueZ Mailing List

Hi Thor,

> I altered the hci_sock.c code and disabled the security filter. Works fine 
> for
> all hci commands, (I still do reset/up/down/setraw through ioctl).
> 
> If I further removed the capable calls in BlueZ, would it work for a normal 
> user then?

this would work, but you should better give an user or the application
the CAP_NET_ADMIN right.

Regards

Marcel




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

end of thread, other threads:[~2004-03-01 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-01 15:48 [Bluez-users] Socket permissions Thor Egil Skaug
2004-03-01 16:00 ` TM
2004-03-01 16:13   ` Thor Egil Skaug
2004-03-01 16:17 ` Marcel Holtmann
     [not found] <BAY1-F110eiS609lcQt00003ec7@hotmail.com>
2004-03-01 17:27 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox