summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 14:08:56 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 14:08:56 +0100
commit5f3e0a63677aea3c3619b747eaabb42b32d825c2 (patch)
tree1edb94198895ecb4cb25533005942b21ee997f9c /apt-pkg/depcache.cc
parent1310a1db3e71d9c1548a7ed84dd80d871d5a397c (diff)
parent7898bd970a791bb8892b0dfdffc683828a447900 (diff)
- ensure proper permissions in the extended_state file (LP#67037)
- applied patch to (optionally) hide the auto-remove information (thanks to Frode M. Døving) (LP#69148)
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index fe8a617ac..27e0ff73f 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -26,6 +26,8 @@
#include <sstream>
#include <set>
+#include <sys/stat.h>
+
#include <apti18n.h>
pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) :
@@ -256,8 +258,9 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
}
fclose(OutFile);
- // move the outfile over the real file
+ // move the outfile over the real file and set permissions
rename(outfile.c_str(), state.c_str());
+ chmod(state.c_str(), 0644);
return true;
}