summaryrefslogtreecommitdiffstats
path: root/src/fw-iso.c
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2009-01-10 21:03:25 +0100
committerGravatar Dan Dennedy 2009-01-10 16:50:28 -0800
commita59532c835c2a0c403059e4dbb8a6eb6e6bce516 (patch)
tree78d9d1c5752ff3a3502ec5e3baa5f1203471de19 /src/fw-iso.c
parentFix stack corruption during juju lock transactions (diff)
Work without permission to access local node's /dev/fw*
On 10 Jan, David Moore wrote: > On Sat, 2009-01-10 at 19:28 +0100, Stefan Richter wrote: >> @@ -161,14 +160,16 @@ scan_devices(fw_handle_t handle) ... >> + for (j = 0; j < i; j++) >> + if (ports[j].card == get_info.card) >> + continue; >> + > > That continue statement doesn't do what you intended I think. From: Stefan Richter <stefanr@s5r6.in-berlin.de> Subject: [PATCH] Work without permission to access local node's /dev/fw* Fix for juju backend: libraw1394 required write permission to the character device file of the local node(s) in order to enumerate cards and for a number of other operations. This forced users to either run applications like dvgrab and kino with elevated privileges, or to configure write permission for all /dev/fw* or at least for local nodes' /dev/fw*. We now use the first accessible file which was found for each card for as many tasks as possible, instead of the local node's file. This allows distributors or admins to implement stricter access rights (default off, e.g. only on for AV/C and IIDC devices) without sacrificing functionality of said class of applications. Access to the local node is now only required by low-level tools like gscanbus. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
Diffstat (limited to 'src/fw-iso.c')
-rw-r--r--src/fw-iso.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fw-iso.c b/src/fw-iso.c
index 6a84662..a87259b 100644
--- a/src/fw-iso.c
+++ b/src/fw-iso.c
@@ -407,7 +407,7 @@ iso_init(fw_handle_t handle, int type,
if (handle->iso.packets == NULL)
return -1;
- handle->iso.fd = open(handle->local_filename, O_RDWR);
+ handle->iso.fd = open(handle->iso.filename, O_RDWR);
if (handle->iso.fd < 0) {
free(handle->iso.packets);
handle->iso.packets = NULL;
@@ -557,7 +557,7 @@ int fw_read_cycle_timer(fw_handle_t handle,
int err;
struct fw_cdev_get_cycle_timer ctr = { 0 };
- err = ioctl(handle->local_fd, FW_CDEV_IOC_GET_CYCLE_TIMER, &ctr);
+ err = ioctl(handle->ioctl_fd, FW_CDEV_IOC_GET_CYCLE_TIMER, &ctr);
if (!err) {
*cycle_timer = ctr.cycle_timer;
*local_time = ctr.local_time;