Merge lp:~sergiusens/snapcraft/1511161 into lp:~snappy-dev/snapcraft/core

Proposed by Sergio Schvezov on 2015-10-29
Status: Merged
Approved by: Leo Arias on 2015-10-29
Approved revision: 259
Merged at revision: 259
Proposed branch: lp:~sergiusens/snapcraft/1511161
Merge into: lp:~snappy-dev/snapcraft/core
Diff against target: 13 lines (+2/-2)
1 file modified
snapcraft/repo.py (+2/-2)
To merge this branch: bzr merge lp:~sergiusens/snapcraft/1511161
Reviewer Review Type Date Requested Status
Leo Arias 2015-10-29 Approve on 2015-10-29
Review via email: mp+276075@code.launchpad.net

Commit Message

stat and chmod the actual file and not the target when removing suid/guid bits

To post a comment you must log in.
lp:~sergiusens/snapcraft/1511161 updated on 2015-10-29
259. By Sergio Schvezov on 2015-10-29

stat and chmod the actual file and not the target when removing suid/guid bits

Leo Arias (elopio) wrote :

Tested in vivid. The test now passes, and the snap can be installed and executed.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snapcraft/repo.py'
2--- snapcraft/repo.py 2015-10-19 19:54:09 +0000
3+++ snapcraft/repo.py 2015-10-29 02:17:15 +0000
4@@ -268,9 +268,9 @@
5
6
7 def _fix_filemode(path):
8- mode = stat.S_IMODE(os.stat(path).st_mode)
9+ mode = stat.S_IMODE(os.stat(path, follow_symlinks=False).st_mode)
10 if mode & 0o4000 or mode & 0o2000:
11- logger.debug('Removing suid/guid from {}'.format(path))
12+ logger.warning('Removing suid/guid from {}'.format(path))
13 os.chmod(path, mode & 0o1777)
14
15

Subscribers

People subscribed via source and target branches