Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#5792 closed patch (fixed)

Media monitor can get stuck in symlink loops

Reported by: danielk Owned by: danielk
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I discovered this when testing portions of #5596. The attached is a patch to fix it, but the media monitor has changes since I wrote this and I haven't yet had time to re-test the patch.

Attachments (2)

5792-v1.patch (1.7 KB) - added by danielk 16 years ago.
5792-v2.patch (1.7 KB) - added by Nigel 16 years ago.
Clean patch for recent SVN. Untested

Download all attachments as: .zip

Change History (7)

Changed 16 years ago by danielk

Attachment: 5792-v1.patch added

Changed 16 years ago by Nigel

Attachment: 5792-v2.patch added

Clean patch for recent SVN. Untested

comment:1 Changed 16 years ago by Nigel

There are a few other places where symlinks are traversed. Having something like SymlinkTarget?(QFileInfo file, int maxLinks=255); in libmyth/util.cpp may be beneficial?

comment:2 Changed 15 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:3 Changed 15 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [19454]) Fixes #5792. Adds a 'getSymlinkTarget()' function to util.h at Nigel's suggestion and uses it to prevent infinite loops in mythmedia.cpp as the original patch did.

comment:4 Changed 15 years ago by Nigel

(In [20117]) A few more usages of safe symlink traversing function. Lightly tested. See #5792

comment:5 Changed 15 years ago by Nigel

(In [20118]) One more use of safe symlink traversing function. Lightly tested. See #5792

Note: See TracTickets for help on using tickets.