mythvideo assumes passwd db is local

Bug #511858 reported by Nicholas J Kreucher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mythbuntu
Fix Released
Low
Unassigned
mythplugins (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The /etc/cron.hourly/mythvideo jamu script assumes the mythtv user is stored in /etc/passwd. An easy change will support any configured passwd backend (ldap, nis etc):

# diff -u /etc/cron.hourly/mythvideo.orig /etc/cron.hourly/mythvideo
--- /etc/cron.hourly/mythvideo.orig 2010-01-24 02:27:13.866426860 -0800
+++ /etc/cron.hourly/mythvideo 2010-01-24 02:29:23.486429345 -0800
@@ -1,7 +1,8 @@
 #!/bin/sh
 #Hourly massive update to ensure users see graphics coming in for upcoming recordings and current recordings
-DIRECTORY=$(grep ^mythtv /etc/passwd | awk -F : '{print $6}')
+DIRECTORY=$(getent passwd mythtv | cut -d':' -f6)
 if [ -f "$DIRECTORY/.mythtv/config.xml" ]; then
     su mythtv -c "/usr/bin/python /usr/share/mythtv/mythvideo/scripts/jamu.py -MW >> '/var/log/mythtv/jamu.log'"
 fi

Mythbuntu 9.10 / 0.22.0+fixes22594-0ubuntu1

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Thank you for helping to improve Mythbuntu by opening this ticket. I am marking this ticket as confirmed because it appears to have enough information to help the developers understand the problem. It is possible I am wrong and another more experienced triager or developer may adjust the status of the ticket to "incomplete" and request additional information.

Changed in mythbuntu:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Mario Limonciello (superm1) wrote :

Thanks for the patch! I've committed this to the fixes packaging. It will show up on the next set of autobuilds or in the current development release (Lucid Lynx) after the mythplugins task is closed.

Changed in mythbuntu:
status: Confirmed → Fix Committed
Changed in mythplugins (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythplugins - 0.22.0+fixes23527-0ubuntu1

---------------
mythplugins (0.22.0+fixes23527-0ubuntu1) lucid; urgency=low

  * New snapshot (r23527)
  * debian/control:
    - Recommends for python-imaging (LP: #500313)
  * debian/mythweb.postinst:
    - Check that a 'default' site is available before attempting to
      make a new one. (LP: #462405)
    - Check that the new site to enable exists before enabling.
  * debian/mythvideo.cron.*:
    - Redirect all output on stderr into the log file too (LP: #487880)
    - Check that a frontend is installed to determine if this job should
      be ran. (LP: #507436)
  * debian/mythvideo.logrotate:
    - Supply a logrotate script for jamu.

  [ Nicholas J Kreucher ]
  * debian/mythvideo.cron.*:
    - Use getent instead of grep /etc/passwd (LP: #511858)
 -- Mario Limonciello <email address hidden> Sun, 14 Feb 2010 19:24:14 -0600

Changed in mythplugins (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
MarcRandolph (mrand) wrote :

This fix should be present in the alpha4 (and later auto-builds) for 10.04 (Lucid).

Changed in mythbuntu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.