Merge lp://qastaging/~lfaraone/pithos/password-permissions-fix into lp://qastaging/~kevin-mehall/pithos/trunk

Proposed by Luke Faraone
Status: Merged
Merged at revision: 157
Proposed branch: lp://qastaging/~lfaraone/pithos/password-permissions-fix
Merge into: lp://qastaging/~kevin-mehall/pithos/trunk
Diff against target: 104 lines (+62/-3)
2 files modified
bin/pithos (+3/-0)
pithos/PreferencesPithosDialog.py (+59/-3)
To merge this branch: bzr merge lp://qastaging/~lfaraone/pithos/password-permissions-fix
Reviewer Review Type Date Requested Status
Kevin Mehall Pending
Review via email: mp+57198@code.qastaging.launchpad.net

Commit message

CVE-2011-1500: Fix password leak to local users through file permissions. (LP: #733307)

On start, check file permissions according to new rules as follows:

  If the file is 0644 and if "unsafe_permissions" is not True,
    chmod 0600
  If the file is world-readable and/or writable (but not exactly 0644) and if
  "unsafe_permissions" is not True:
    chmod o-rw

To override this new behavior, set unsafe_permissions to False in pithos.ini.

On new configuration file creation, set to 0600.

Description of the change

Fixes bad permissions on the config file.

To test, verify that:

 * On new systems it creates a file with 0600 permissions
 * On upgraded systems it changes files with 0644 permissions to 0600
 * On systems where the file had 0640 / 0660 permissions, nothing is changed.

 * After running once, an unsafe_permissions key is created.
 * Setting unsafe_permissions to True causes the above rules to be ignored.

To post a comment you must log in.
158. By Luke Faraone

Handle o+rw in one run.

Previously didn't modify the config_perms value, so when we ORd it the second time the changes made the first time were not preserved.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.