|
From: Peter K. <pk...@us...> - 2001-03-13 22:19:46
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.86 1.87=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added O_NOCTTY flag to all open() calls of any /dev/ttyBT* device to
make sure we do not accidentally end up with one as controlling TTY.
The diff of the modified file(s):
--- btd.c 2001/03/09 16:23:51 1.86
+++ btd.c 2001/03/13 22:21:16 1.87
@@ -1749,7 +1749,7 @@
#endif=20=20
=20
syslog(LOG_INFO, "Opening dev %s\n", dev);
- if ((fd =3D open(dev, flags)) < 0 )
+ if ((fd =3D open(dev, flags | O_NOCTTY)) < 0)
{=20
perror("open_device");
exit(1);
@@ -3100,7 +3100,7 @@
int devfd;
=20
printf("Resetting HW board...\n");
- if ((devfd =3D open(BT_CTRL_TTY, O_RDWR)) >=3D 0)
+ if ((devfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY)) >=3D 0)
{
if (ioctl(devfd, BTRESETPHYSICALHW) < 0)
{
|