[oe-commits] [bitbake] branch master-next updated: lib/bb/utils: prevent movefile from changing dest dir permissions
git at git.openembedded.org
git at git.openembedded.org
Mon Apr 23 11:23:05 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
The following commit(s) were added to refs/heads/master-next by this push:
new 82ea737 lib/bb/utils: prevent movefile from changing dest dir permissions
82ea737 is described below
commit 82ea737a0b42a8b53e11c9cde141e9e9c0bd8c40
Author: Mattias Hansson <mattias.hansson at axis.com>
AuthorDate: Tue Apr 10 16:44:51 2018 +0200
lib/bb/utils: prevent movefile from changing dest dir permissions
Prevent movefile from falsely setting the source file's owner and
permissions on the destination directory instead of the destination
file when moving between devices.
This bug caused the last file moved into a directory to dictate the
directory's owner and permissions.
Signed-off-by: Mattias Hansson <mattias.hansson at axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 8b739d7..378e699 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -807,8 +807,8 @@ def movefile(src, dest, newmtime = None, sstat = None):
return None # failure
try:
if didcopy:
- os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID])
- os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
+ os.lchown(destpath, sstat[stat.ST_UID], sstat[stat.ST_GID])
+ os.chmod(destpath, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
os.unlink(src)
except Exception as e:
print("movefile: Failed to chown/chmod/unlink", dest, e)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list