On Sun, May 13, 2007 at 12:54:13AM +0200, Francesco Poli <[EMAIL PROTECTED]>
was heard to say:
> Hence I would say this file is not installed by any package.
> I guess it's created by the first run of aptitude, right?
Yes, it is.
=============== src/generic/aptcache.cc, line 551 =================
newstate.Open(statefile+".new", FileFd::WriteEmpty);
===================================================================
That's using the apt file-handling code:
=================== apt-pkg/contrib/fileutl.h =====================
bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666);
===================================================================
which eventually calls open(2)
================== apt-pkg/contrib/fileutl.cc =====================
iFd = open(FileName.c_str(),O_RDWR | O_CREAT | O_TRUNC,Perms);
===================================================================
i.e., aptitude does everything it can to make that file world-readable
short of chmod'ing it. Is root's umask set to something like 0077 on
your machine? (run "umask" as root to find out) Even if it isn't now,
I bet it was when you ran aptitude the first time. An easy fix would be
to chmod the file when I create it; there isn't any security-sensitive
stuff in it, and as you found out, the effects of a non-readable
pkgstates file can be surprising.
Daniel
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]