Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #4860: Change scaled preview image filesystem permissions

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


mythtv at cvs

Mar 4, 2008, 11:12 AM

Post #1 of 6 (676 views)
Permalink
Ticket #4860: Change scaled preview image filesystem permissions

#4860: Change scaled preview image filesystem permissions
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean [at] thirdcontact> | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Mlocked: 0
----------------------------------------------+-----------------------------
The primary purpose of the attached patch, mythtv-
scaled_preview_filesystem_permissions-makeFileAccessible.patch , is to
modify the filesystem permissions of the scaled preview images created by
MythXML to match the permissions of those created directly by the preview
generator. Changesets [9566] and [9571] added a hack to allow all
frontends/backends to access preview files even if the user fails to
properly configure the umask/environment settings as required for their
system configuration (i.e. with different users running
mythfrontend/mythbackend or using NFS with different users/UID's on
different hosts). Note that the patch does not modify permissions on any
of the other images generated by MythXML (i.e. channel icons, album art
images, ...).

When I mentioned the change in IRC, Daniel suggested that rather than
duplicating the hack again, we should abstract the chmod hack to its own
function so that we could easily modify it if we come up with a better
solution or only apply the hack on a misconfigured system (if we add an
approach to detect or allow the user to specify their system is
misconfigured). Therefore, I added a function makeFileAccessible() that
currently only contains the chmod hack. This replaces all calls to chmod
in Myth code with the exception of one in dbutil.cpp which sets the
permission of the defaults-extra-file (containing the DB password) to be
readable only by the user--so it basically requires the opposite
funtionality as provided by makeFileAccessible().

After removing the call to chmod, it appears that the #includes for
<sys/types.h> and <sys/stat.h> are no longer necessary in datadirect.cpp
or in previewgenerator.cpp. After removing them, I was able to compile
without problems on my system. Therefore, I included an additional patch
mythtv-scaled_preview_filesystem_permissions-makeFileAccessible-
headers.patch , which removes the #includes. In previewgenerator.cpp ,
the #includes had comments specifying that they were used by stat, but I
saw no use of *stat in the file, so without the chmod call, the includes
should be unnecessary (as well as the #include <unistd.h>). Note, also,
that <sys/types.h>, <sys/stat.h>, and <unistd.h> were double-included in
previewgenerator.cpp, so they were removed twice.

If anyone has suggestions for additional code for makeFileAccessible()
(i.e. to detect misconfigured systems so we only apply the hack when
necessary), please let me know and I'll be happy to write it up.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4860>
MythTV <http://svn.mythtv.org/trac>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Mar 6, 2008, 11:46 PM

Post #2 of 6 (644 views)
Permalink
Re: Ticket #4860: Change scaled preview image filesystem permissions [In reply to]

#4860: Change scaled preview image filesystem permissions
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean [at] thirdcontact> | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by sphery <mtdean [at] thirdcontact>):

Forgot to include libs/libmyth/util.{h,cpp} when I ran svn diff (and
somehow didn't notice), so the patch was missing the actual function.
Updated patch, mythtv-scaled_preview_filesystem_permissions-
makeFileAccessible-20080307.patch , replaces mythtv-
scaled_preview_filesystem_permissions-makeFileAccessible.patch .

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4860#comment:1>
MythTV <http://svn.mythtv.org/trac>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

May 2, 2008, 8:33 PM

Post #3 of 6 (613 views)
Permalink
Re: Ticket #4860: Change scaled preview image filesystem permissions [In reply to]

#4860: Change scaled preview image filesystem permissions
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean [at] thirdcontact> | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by sphery <mtdean [at] thirdcontact>):

mythtv-4860-scaled_preview_filesystem_permissions-makeFileAccessible.patch
and mythtv-4860-scaled_preview_filesystem_permissions-makeFileAccessible-
headers.patch are updated patches tested with post-Qt4 trunk.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4860#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jul 28, 2008, 12:59 PM

Post #4 of 6 (579 views)
Permalink
Re: Ticket #4860: Change scaled preview image filesystem permissions [In reply to]

#4860: Change scaled preview image filesystem permissions
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean [at] thirdcontact> | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by sphery <mtdean [at] thirdcontact>):

Updated patches to work with the recent changes to trunk that removed
.ascii() calls. mythtv-4860-scaled_preview_filesystem_permissions-
makeFileAccessible-20080728-2.patch and mythtv-4860
-scaled_preview_filesystem_permissions-makeFileAccessible-
headers-20080728.patch are the current set of patches. (I uploaded an old
version with a missing change in mythtv-4860
-scaled_preview_filesystem_permissions-makeFileAccessible-20080728.patch
.)

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4860#comment:3>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Oct 13, 2009, 2:46 PM

Post #5 of 6 (449 views)
Permalink
Re: Ticket #4860: Change scaled preview image filesystem permissions [In reply to]

#4860: Change scaled preview image filesystem permissions
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean [at] thirdcontact> | Owner: mdean
Type: patch | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------
Changes (by stuartm):

* owner: ijr => mdean
* status: new => assigned
* component: mythtv => MythTV - General


--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4860#comment:4>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 11, 2010, 5:36 PM

Post #6 of 6 (383 views)
Permalink
Re: Ticket #4860: Change scaled preview image filesystem permissions [In reply to]

#4860: Change scaled preview image filesystem permissions
----------------------------------------------+-----------------------------
Reporter: sphery <mtdean@…> | Owner: mdean
Type: patch | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: head
Severity: medium | Resolution: fixed
Mlocked: 0 |
----------------------------------------------+-----------------------------
Changes (by mdean):

* status: assigned => closed
* resolution: => fixed


Comment:

(In [23113]) Make scaled preview image filesystem permissions match those
of the "default-sized" preview images.

This change basically applies the same preview-image chmod 666 hack added
in [9566] and [9571] to the preview images created by MythXML. Rather
than replicate the hack, yet again, it moves the chmod to
makeFileAccessible() in libs/libmyth/util.cpp and updates all the previous
code to call that function.

The patch also removes some includes that no longer seem to be necessary
after removing the calls to chmod(). Please send an e-mail to the list or
mention on IRC if your compiler disagrees with me/my compiler.

Closes #4860 with patch from sphery.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4860#comment:5>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.