~fwereade/juju-core/unit-remove-depart-scopes

« back to all changes in this revision

Viewing changes to agent/bootstrap.go

  • Committer: William Reade
  • Date: 2013-11-07 17:30:38 UTC
  • mfrom: (2032.1.6 juju-core)
  • Revision ID: fwereade@gmail.com-20131107173038-d0a72q96dujotc0z
merge parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        // connects to mongo, it changes the mongo password
103
103
        // to the original password.
104
104
        logger.Debugf("setting password hash for admin user")
105
 
        if err := u.SetPasswordHash(passwordHash); err != nil {
 
105
        // TODO(jam): http://pad.lv/1248839
 
106
        // We could teach bootstrap how to generate a custom salt and apply
 
107
        // that to the hash that was generated. At which point we'd need to set
 
108
        // it here. For now, we pass "" so that on first login we will create a
 
109
        // new salt, but the fixed-salt password is still available from
 
110
        // cloud-init.
 
111
        if err := u.SetPasswordHash(passwordHash, ""); err != nil {
106
112
                return err
107
113
        }
108
114
        if err := st.SetAdminMongoPassword(passwordHash); err != nil {