~brian-albrecht/charms/trusty/mysql/trunk

« back to all changes in this revision

Viewing changes to hooks/shared_db_relations.py

Merging MP:208293. Fixing file permissions. lp:1177143

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
            password = pwgen()
49
49
            with open(passwd_file, 'w') as pfile:
50
50
                pfile.write(password)
 
51
                os.chmod(pfile.name, 0600)
51
52
        else:
52
53
            with open(passwd_file) as pfile:
53
54
                password = pfile.read().strip()