Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12253 closed Patch - Bug Fix (fixed)

Patch - Use random temporary filename for schedules direct downloaded data

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: stuartm
Priority: minor Milestone: 0.28
Component: MythTV - Mythfilldatabase Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


Reports on the mythtv-users list indicated that there were cases where if users incorrectly used multiple different usernames while running mythfilldatabase (directly, or indirectly), there were conditions where the schedules direct download data file was not properly cleaned up, resulting in not updating the program schedules.

It appears that while a unique temporary directory is created for schedules direct data is created, it is not used for the mythtv_ddp_data file in some cases (non-shared lineups).

This patch adddresses the use of static filename in this case by using both the random temporary directory prefix, and using a random file name (there are code paths where a temporary directory might not be created).

It seems that this code should be refactored, but since all this code would (ideally) be eliminated with a move to using a xmltv feed, this patch seems like a minimal fix, duplicating existing methods for temporary files and directories in the library.

Ticket #12251 (which should be applied before this patch) provides additional logging to report various errors, and is a prereq for this patch, although (it is hoped) that this patch makes it far less likely that the errors causing the issues would be encountered to be reported/logged.

*NOTE* that there is a missing part to the this patch. The patch (as provided) does not bump the ABI version. Since this ticket may remain under review for some time, I did not want to end up accidentally colliding with some later patch, or make it harder to apply at some future point. This results in a requirement for the developer who commits the patches to create a ABI bump patch.

github ref: github git-am ref:

Change History (3)

comment:1 Changed 7 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Resolution: fixed
Status: newclosed

In 299141e0a69b706239beb35b096df9ed2cea8a7b/mythtv:

DataDirectProcessor?: Use random temporary filenames for downloads

Fixes #12253.

Signed-off-by: Paul Harrison <pharrison@…>

comment:2 Changed 7 years ago by paulh

Milestone: unknown0.28

comment:3 Changed 7 years ago by Gary Buhrmaster <gary.buhrmaster@…>

In 6b3984106bed87e3392eb8842353916da32a5891/mythtv:

DataDirectProcessor?: Use random temporary filenames for downloads

Fixes #12253.

Signed-off-by: Paul Harrison <pharrison@…>
(cherry picked from commit 299141e0a69b706239beb35b096df9ed2cea8a7b)



Note: See TracTickets for help on using tickets.