Bug 150782

Summary: /etc/bluetooth/link_key not written
Product: [openSUSE] SUSE LINUX 10.0 Reporter: ferdinand gassauer <gassauer>
Component: NetworkAssignee: Forgotten User ZhJd0F0L3x <forgotten_ZhJd0F0L3x>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: behlert, security-team
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description ferdinand gassauer 2006-02-14 13:38:38 UTC
according to various documentation, after pairing the link_key should be written down for futher use.

this does not happen any more (worked in SuSE 9.3)
what I did:

* delete linux box on  the phone (S65) for known devices

* access the phone from kbluetooth (icon tray) and multisync.

the pairing happens, the mogile phone asks if it should add the PC to the known devices. YES.

from now on I get an communication error, the phone is not accessible any more.
Comment 1 Michael Gross 2006-02-14 13:56:59 UTC
Sorry but please be more specific. Which application are you talking about?
Comment 2 ferdinand gassauer 2006-02-14 14:42:32 UTC
bluetooth pairing (blueZ, multisync, kdebluetooth)

Comment 3 Forgotten User ZhJd0F0L3x 2006-02-14 15:32:22 UTC
This is a different issue.
- /etc/bluetooth/link_keys is bogus. we need linkkeys for every BT adapter, not just one
- bluez stores the linkkeys in /var/lib/bluetooth/<MAC>/linkkeys, <MAC> is the address of the BT adapter
- in 10.0 there was a bug which caused the linkkeys to be written to /usr/var/lib/bluetooth..., but other applications wanted them in /var/lib/bluetooth..., this is bug 127781.

I think this is a duplicate of 127781.
Comment 4 ferdinand gassauer 2006-02-15 10:01:50 UTC
thanks - saved my life ;.)

work around:

create a link in

/var/lib/bluetooth # ln -s /usr/var/lib/bluetooth/<mac addr> <mac addr>

then everything works again.

Comment 5 ferdinand gassauer 2006-02-15 10:47:23 UTC
IMHO for security reasons the pairing info should reside 
in ~/.bluetooth/<mac addr>/linkkeys
because I do not understand, why another user should have access to "my" paired devices.

Or do I see it wrong?
Comment 6 Forgotten User ZhJd0F0L3x 2006-02-15 11:28:42 UTC
(In reply to comment #4)
> work around:
> create a link in
> /var/lib/bluetooth # ln -s /usr/var/lib/bluetooth/<mac addr> <mac addr>

Yes, this might work around the bug. If everything is working fine with this, we might consider putting out a howto for 10.0 to fix this.
I have to reproduce this on 10.0 myself and think about it; the we will decide if an update or a howto is the best solution ;-)

(In reply to comment #5)
> IMHO for security reasons the pairing info should reside 
> in ~/.bluetooth/<mac addr>/linkkeys
> because I do not understand, why another user should have access to "my"
> paired devices.

IMO this is not so black-and-white:
- IIUC you have to be root to pair the devices anyway (done by hcid)
- i want to use my dialup connection directly after boot, even before
  a user is logged in ;-)

This is something to consider for sure, but you probably better take this to the upstream bluetooth-maintainers.
> 
> Or do I see it wrong?
> 

Comment 7 ferdinand gassauer 2006-02-15 13:32:00 UTC
IMHO the pairing is down and written by root, but initialized from ONE user. So from the users point of view it's done by the user.

if the dial up connection should be available commonly before user login, this could be a (revokable) option, but not a silent "feature".  



Comment 8 ferdinand gassauer 2006-02-15 13:40:17 UTC
sorry I ment "pairing is DONE"

I have crossposted this bug to bluez-devel@lists.sourceforge.net
Comment 9 ferdinand gassauer 2006-02-15 19:42:23 UTC
IMHO the security question is (also) device dependant.
a bluetooth printer might be available after booting, a mobile phone not or only partially (making fax / phone calls, but NOT addressbook and calendar, pictures etc)
Comment 10 Forgotten User ZhJd0F0L3x 2006-07-03 15:12:18 UTC
up to comment #4: this is working fine in 10.1, i will probably have a hard time putting out a bluetooth update for this issue and 10.0 now.
comments #5 up: this is being worked on upstream with the bluetooth-dbus API IIUC.

So i'll close this as fixed, although it really is only fixed in 10.1 :-(