diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-13 03:40:48 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-13 03:40:48 +0000 |
commit | 2f7b3a2547cc25c23cc035ca85e2dbfbea3b0765 (patch) | |
tree | 160b2f6613deaab1e90e039e10273e3f515779f0 | |
parent | 66a5f328ffdccd4792dc9cd42db440dca6085596 (diff) | |
download | portage-2f7b3a2547cc25c23cc035ca85e2dbfbea3b0765.tar.gz portage-2f7b3a2547cc25c23cc035ca85e2dbfbea3b0765.tar.bz2 portage-2f7b3a2547cc25c23cc035ca85e2dbfbea3b0765.zip |
Use apply_secpass_permissions() to avoid OperationNotPermitted errors when
not allowed to chown files to root uid.
svn path=/main/trunk/; revision=11873
-rw-r--r-- | pym/portage/news.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/news.py b/pym/portage/news.py index d26a3ab8d..aa979dabd 100644 --- a/pym/portage/news.py +++ b/pym/portage/news.py @@ -10,7 +10,7 @@ __all__ = ["NewsManager", "NewsItem", "DisplayRestriction", import logging import os import re -from portage.util import apply_permissions, ensure_dirs, \ +from portage.util import apply_secpass_permissions, ensure_dirs, \ grabfile, normalize_path, write_atomic, writemsg_level from portage.data import portage_gid from portage.dep import isvalidatom @@ -124,14 +124,14 @@ class NewsManager(object): if unread != unread_orig: write_atomic(unread_filename, "".join("%s\n" % x for x in sorted(unread))) - apply_permissions(unread_filename, + apply_secpass_permissions(unread_filename, uid=self._uid, gid=self._gid, mode=self._file_mode, mask=self._mode_mask) if skip != skip_orig: write_atomic(skip_filename, "".join("%s\n" % x for x in sorted(skip))) - apply_permissions(skip_filename, + apply_secpass_permissions(skip_filename, uid=self._uid, gid=self._gid, mode=self._file_mode, mask=self._mode_mask) |