[Bug 92752] Re: [SRU] package installation creates /root/.tvtime
Brian Murray
brian at ubuntu.com
Wed Dec 12 23:46:26 UTC 2012
I've uploaded this to the Quantal -proposed queue.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/92752
Title:
[SRU] package installation creates /root/.tvtime
Status in “tvtime” package in Ubuntu:
Fix Released
Status in “tvtime” source package in Precise:
Triaged
Status in “tvtime” source package in Quantal:
Triaged
Status in “tvtime” package in Debian:
Fix Released
Bug description:
Binary package hint: tvtime
Since Dapper, tvtime is installed with root as the owner. This makes
it so the user can't save channel data, picture settings, etc.
ProblemType: Bug
Architecture: i386
Date: Fri Mar 16 01:12:08 2007
DistroRelease: Ubuntu 7.04
Uname: Linux godzilla 2.6.20-11-generic #2 SMP Thu Mar 15 08:03:07 UTC 2007 i686 GNU/Linux
SRU JUSTIFICATION:
[Impact] + [Test Case]
From Debian bug (http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=694892):
"Hi,
during a test with piuparts I noticed that your package creates files in
/root. From the attached log
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=tvtime_1.0.2-9.log.gz;att=1;bug=694892 (scroll to the bottom):
0m34.1s ERROR: FAIL: Package purging left files on system:
/root/.tvtime/ not owned
Creating stuff in /root is a FHS and policy violation. (And of course
these files should not be deleted by maintainer scripts.)
But it is also an indication that the package operation may depend on
root's .tvtime configuration (and package installation might even fail if
that configuration is broken). That would be a case for "configuration
files not in /etc"."
This might also be the cause for "this bug" where a users ~/.tvtime/ is
owned by root:root - probably depending on how the user switched to root.
[Regression Potential]
"This is due to tvtime-configure being called in the postinst script.
tvtime-configure uses config_new() which in turn contains this code:
/* Make the ~/.tvtime directory every time on startup, to be safe. */
if( asprintf( &temp_dirname, "%s/.tvtime", getenv( "HOME" ) ) < 0 ) {
/* FIXME: Clean up ?? */
return 0;
}
mkdir_and_force_owner( temp_dirname, ct->uid, getgid() );
free( temp_dirname );
Therefore, tvtime-configure creates $HOME/.tvtime everytime you
run it, even when the invocation is something like
tvtime-configure -F /etc/tvtime/tvtime.xml
I have attached a patch which will fix the bug (that is, not create
$HOME/.tvtime on every run) but will still work correctly by creating
dirname(config_filename) before saving. I tested it by changing the
deinterlacing setting."
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tvtime/+bug/92752/+subscriptions
More information about the Ubuntu-sponsors
mailing list