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

Issue 5540053: Set file permissions on credentials files. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by jcgregorio_google
Modified:
12 years, 7 months ago
CC:
google-api-python-client_googlegroups.com
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : Remove try #

Total comments: 2

Patch Set 3 : Address race condition. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -8 lines) Patch
M oauth2client/file.py View 1 3 chunks +20 lines, -2 lines 0 comments Download
M oauth2client/multistore_file.py View 1 2 3 chunks +8 lines, -6 lines 0 comments Download
M tests/test_oauth2client_file.py View 1 2 3 chunks +37 lines, -0 lines 0 comments Download

Messages

Total messages: 5
jcgregorio_google
12 years, 8 months ago (2012-01-13 16:39:55 UTC) #1
Ali Afshar
Please feel free to ignore this review, I was just browsing :) http://codereview.appspot.com/5540053/diff/2001/oauth2client/multistore_file.py File oauth2client/multistore_file.py ...
12 years, 8 months ago (2012-01-13 17:25:38 UTC) #2
aiuto
lgtm The race condition might be an issue, but I'll leave it up to you. ...
12 years, 7 months ago (2012-01-17 15:43:21 UTC) #3
jcgregorio_google
http://codereview.appspot.com/5540053/diff/2001/oauth2client/multistore_file.py File oauth2client/multistore_file.py (right): http://codereview.appspot.com/5540053/diff/2001/oauth2client/multistore_file.py#newcode179 oauth2client/multistore_file.py:179: self._file_handle = open(self._filename, 'r+b') On 2012/01/13 17:25:38, Ali Afshar ...
12 years, 7 months ago (2012-01-17 16:37:05 UTC) #4
jcgregorio_google
12 years, 7 months ago (2012-01-17 16:38:18 UTC) #5
Committed in
http://code.google.com/p/google-api-python-client/source/detail?r=0dbce244dcf...

On 2012/01/17 16:37:05, jcgregorio_google wrote:
>
http://codereview.appspot.com/5540053/diff/2001/oauth2client/multistore_file.py
> File oauth2client/multistore_file.py (right):
> 
>
http://codereview.appspot.com/5540053/diff/2001/oauth2client/multistore_file....
> oauth2client/multistore_file.py:179: self._file_handle = open(self._filename,
> 'r+b')
> On 2012/01/13 17:25:38, Ali Afshar wrote:
> > Small potential race condition here, why not try to open 'r+b' and catch the
> > OSError with errno.EACCES, and open read only in that case?
> 
> Done.
Sign in to reply to this message.

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