From: Michael Vogt Date: Wed, 14 Mar 2007 13:07:51 +0000 (+0100) Subject: * apt-pkg/depcache.cc: X-Git-Tag: 0.7.21~277^2~2^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/8a3a2e994e0e49fb5b610dba0f810b67f0ab229e * apt-pkg/depcache.cc: - always chmod extended_states to 0644 --- 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 #include +#include + #include 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; } diff --git a/cmdline/apt-mark b/cmdline/apt-mark index 533ed8715..728f083dc 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -61,3 +61,4 @@ if __name__ == "__main__": outfile.write(str(tagfile.Section)+"\n") # all done, rename the tmpfile os.rename(outfile.name, STATE_FILE) + os.chmod(outfile.name, 0644)