Skip to content

Commit

Permalink
Process umask shouldn't allow world-readable files
Browse files Browse the repository at this point in the history
This ensures that image cache files and file-backed
images are not world-readable.

Fix LP bug 1031796

Change-Id: I85a26b4e645e7cb32e17164e47fad62f4c44976a
  • Loading branch information
Tom Hancock committed Aug 1, 2012
1 parent eeedad3 commit e7919a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions glance/common/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def hup(*args):
self.application = application
self.sock = get_socket(default_port)

os.umask(027) # ensure files are created with the correct privileges
self.logger = os_logging.getLogger('eventlet.wsgi.server')

if CONF.workers == 0:
Expand Down

0 comments on commit e7919a2

Please sign in to comment.