Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1190)

Issue 5980045: When extracting charms, use only filetype mode bits to detect symlinkicity

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by fwereade
Modified:
12 years, 1 month ago
Reviewers:
mp+100769
Visibility:
Public.

Description

When extracting charms, use only filetype mode bits to detect symlinkicity We had been writing, and checking for, a magic value (in external_attr) which happened to equal `(stat.S_IFLNK | 0755) << 16`; the charm store was giving us one equal to `(stat.S_IFLNK | 0777) << 16`, and we weren't considering that to be a symlink. We now just check the filetype and ignore permissions on symlinks. https://code.launchpad.net/~fwereade/juju/fix-charm-symlinks/+merge/100769 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : When extracting charms, use only filetype mode bits to detect symlinkicity #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -11 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M juju/charm/base.py View 1 chunk +0 lines, -5 lines 0 comments Download
M juju/charm/bundle.py View 3 chunks +4 lines, -4 lines 0 comments Download
M juju/charm/directory.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/charm/tests/test_bundle.py View 2 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
12 years, 1 month ago (2012-04-04 11:38:04 UTC) #1
hazmat
LGTM
12 years, 1 month ago (2012-04-04 12:23:43 UTC) #2
fwereade
12 years, 1 month ago (2012-04-04 12:30:32 UTC) #3
*** Submitted:

When extracting charms, use only filetype mode bits to detect symlinkicity

We had been writing, and checking for, a magic value (in external_attr)
which happened to equal `(stat.S_IFLNK | 0755) << 16`; the charm store was
giving us one equal to `(stat.S_IFLNK | 0777) << 16`, and we weren't
considering that to be a symlink. We now just check the filetype and ignore
permissions on symlinks.

R=hazmat
CC=
https://codereview.appspot.com/5980045
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b