When pushed, this commit will replace hard-coded values with calls to LookupMQM

This commit is contained in:
Stephen Marshall
2018-04-25 14:09:23 +01:00
parent bf36f8bb2c
commit 3aa46e0793
6 changed files with 42 additions and 33 deletions

View File

@@ -64,8 +64,12 @@ func (ks *KeyStore) Create() error {
}
}
}
// TODO: Lookup value for MQM user here?
err = os.Chown(ks.Filename, 999, 999)
mqmUID, mqmGID, err := command.LookupMQM()
if err != nil {
log.Error(err)
return err
}
err = os.Chown(ks.Filename, mqmUID, mqmGID)
if err != nil {
log.Error(err)
return err
@@ -88,8 +92,12 @@ func (ks *KeyStore) CreateStash() error {
}
return err
}
// TODO: Lookup value for MQM user here?
err = os.Chown(stashFile, 999, 999)
mqmUID, mqmGID, err := command.LookupMQM()
if err != nil {
log.Error(err)
return err
}
err = os.Chown(stashFile, mqmUID, mqmGID)
if err != nil {
log.Error(err)
return err