summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 14:07:51 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 14:07:51 +0100
commit8a3a2e994e0e49fb5b610dba0f810b67f0ab229e (patch)
tree3c3b27e2720bcc9f73fd7ff66584a24bac860e1e /apt-pkg/depcache.cc
parent7898bd970a791bb8892b0dfdffc683828a447900 (diff)
* apt-pkg/depcache.cc:
- always chmod extended_states to 0644
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 f5673dd5d..4794d3503 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) :
@@ -253,8 +255,9 @@ bool pkgDepCache::writeStateFile(OpProgress *prog)
}
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;
}