diff options
author | Bastien Nocera <hadess@hadess.net> | 2010-09-06 15:43:48 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-09-06 19:05:14 +0300 |
commit | 3a9811d70863b4922f26f70d8aa1a8eb77e41998 (patch) | |
tree | 639e782cd7bdd8067873b7276177be48b3376f6b /src/oui.c | |
parent | d23defc9445647a62e8893aaec631131f963a167 (diff) | |
download | bluez-3a9811d70863b4922f26f70d8aa1a8eb77e41998.tar.gz |
Make the path to oui.txt a compile-time option
This avoids bluetoothd trying to load oui.txt from multiple locations
and cause SELinux AVC denials by accessing files it's not supposed
to touch.
Diffstat (limited to 'src/oui.c')
-rw-r--r-- | src/oui.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -38,23 +38,15 @@ /* http://standards.ieee.org/regauth/oui/oui.txt */ -#define OUIFILE "/var/lib/misc/oui.txt" - char *ouitocomp(const char *oui) { struct stat st; char *str, *map, *off, *end; int fd; - fd = open("oui.txt", O_RDONLY); - if (fd < 0) { - fd = open(OUIFILE, O_RDONLY); - if (fd < 0) { - fd = open("/usr/share/misc/oui.txt", O_RDONLY); - if (fd < 0) - return NULL; - } - } + fd = open(OUIFILE, O_RDONLY); + if (fd < 0) + return NULL; if (fstat(fd, &st) < 0) { close(fd); |