cmd/initContainer: Style fix
Use a strings.Builder [1] instance instead of raw string literals for
consistency.
Fallout from 772b66bf3e
[1] https://pkg.go.dev/strings#Builder
https://github.com/containers/toolbox/pull/1636
This commit is contained in:
parent
3017a46c03
commit
02fe08f70e
|
|
@ -551,15 +551,16 @@ func configureKerberos() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
kcmConfigString := `# Written by Toolbx
|
||||
# https://containertoolbx.org/
|
||||
#
|
||||
# # To disable the KCM credential cache, comment out the following lines.
|
||||
|
||||
[libdefaults]
|
||||
default_ccache_name = KCM:
|
||||
`
|
||||
var builder strings.Builder
|
||||
builder.WriteString("# Written by Toolbx\n")
|
||||
builder.WriteString("# https://containertoolbx.org/\n")
|
||||
builder.WriteString("#\n")
|
||||
builder.WriteString("# # To disable the KCM credential cache, comment out the following lines.\n")
|
||||
builder.WriteString("\n")
|
||||
builder.WriteString("[libdefaults]\n")
|
||||
builder.WriteString(" default_ccache_name = KCM:\n")
|
||||
|
||||
kcmConfigString := builder.String()
|
||||
kcmConfigBytes := []byte(kcmConfigString)
|
||||
if err := ioutil.WriteFile("/etc/krb5.conf.d/kcm_default_ccache", kcmConfigBytes, 0644); err != nil {
|
||||
return errors.New("failed to configure Kerberos to use KCM as the default credential cache")
|
||||
|
|
|
|||
Loading…
Reference in New Issue