Yeah so it's probably MCC that is doing it then solely, and still needs to
be fixed.  Thanks for diagnosing!

On Sat, Mar 21, 2009 at 11:43, JanCeuleers
<jan.ceule...@computer.org>wrote:

> Here's my feeble attempt at diagnosing this:
>
> ****
> mythbuntu-control-centre_0.10-0ubuntu1_all.deb is not the smoking gun, but
> it does contain the following in
> data/usr/share/pycentral/mythbuntu-control-centre/site-packages/MythbuntuControlCentre/changer.py:
>
>    def write_mysql_txt(self,user,password,database,server):
>        """Writes out a mysql.txt in /etc/mythtv"""
>        if os.path.exists("/etc/mythtv/mysql.txt"):
>            print "Moving /etc/mythtv/mysql.txt to
> /etc/mythtv/mysql.txt.mythbuntu-old"
>            shutil.move("/etc/mythtv/mysql.txt",
> "/etc/mythtv/mysql.txt.mythbuntu-old")
>        out_f = open("/etc/mythtv/mysql.txt", "w")
>        out_f.write("DBHostName=" + server + "\n")
>        out_f.write("DBUserName=" + user + "\n")
>        out_f.write("DBName=" + database + "\n")
>        out_f.write("DBPassword=" + password + "\n")
>        out_f.close()
>
> This snippet does not appear to set the mode of the file at all, so that it
> inherits the permissions from /etc/mythtv (which on my system is owner by
> root). I think that this does need to be fixed.
> ****
> mythtv-common_0.20.2-0ubuntu10_all.deb
>
> control/postinst contains the following:
>
>        NEW=$(mktemp -t mysql.txt-XXXXXX)
>        if [ -s /etc/mythtv/mysql.txt ]; then
>            INPUT=/etc/mythtv/mysql.txt
>            chown --reference="$INPUT" "$NEW"
>            chmod --reference="$INPUT" "$NEW"
>        else
>            INPUT=/usr/share/mythtv/mysql.txt.dist
>            chown mythtv:mythtv "$NEW"
>            chmod 660 "$NEW"
>        fi
>
> ($NEW later gets mv-ed into place).
>
> This seems correct: it either inherits the ownership and mode of the file
> if it already exists, or else it gets set to mythtv:mythtv and 660.
> ****
>
> That's all I've been able to come up with. This was done by searching
> for "mysql.txt" within the files contained in the deb archives (ar -x,
> followed by tar zxvf of both data and control files, followed by fgrep
> -r).
>
> If you have other suggestions for diagnosing this I'd be delighted.
>
> Thanks
>
> --
> Mode of /etc/mythtv/mysql.txt should be 660
> https://bugs.launchpad.net/bugs/343204
> You received this bug notification because you are a member of MythTV
> Ubuntu Maintainers, which is subscribed to mythtv in ubuntu.
>


-- 
Mario Limonciello
supe...@gmail.com
Sent from: Austin Texas United States.

-- 
Mode of /etc/mythtv/mysql.txt should be 660
https://bugs.launchpad.net/bugs/343204
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to