Hi Marcel, On Mon, Sep 30, 2013 at 10:33:54AM +0200, Marcel Holtmann wrote: > >>> + /* Since daemon would be run also on host we have to grant perms */ > >>> + chmod(sock_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | > >>> + S_IWOTH); > >> > >> If it is really necessary to have a world writable socket, better > >> explain in detail on the comment. > > > > the problem here is that we need to run this on a host and on Android > > where HAL is running under user bluetooth, this has to be changed to use > > ifdef logic. > > and why are we not starting the daemon as user bluetooth with proper capabilities. there is an option capability in init.rc http://androidxref.com/4.3_r2.1/xref/system/core/init/init_parser.c#84 but it does nothing: http://androidxref.com/4.3_r2.1/xref/system/core/init/init_parser.c#659 at least in Android 4.3 So we run as root and then drop uid and guid. Can we use some better way? Best regards Andrei Emeltchenko -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html