Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
Open rbac.conf with every call, else we don't see our own changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
thkukuk committed Jun 21, 2019
1 parent 3a1d116 commit 7d727cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/kubicd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var (
crtFile = "/etc/kubicd/pki/KubicD.crt"
keyFile = "/etc/kubicd/pki/KubicD.key"
caFile = "/etc/kubicd/pki/Kubic-Control-CA.crt"
rbac, rbac_err = ini.LooseLoad("/usr/share/defaults/kubicd/rbac.conf", "/etc/kubicd/rbac.conf")
cfg, cfg_err = ini.LooseLoad("/usr/share/defaults/kubicd/kubicd.conf", "/etc/kubicd/kubicd.conf")
)

Expand Down Expand Up @@ -107,6 +106,8 @@ func (s *cert_server) CreateCert(ctx context.Context, in *pb.CreateCertRequest)

func rbacCheck(user string, function string) bool {

rbac, rbac_err := ini.LooseLoad("/usr/share/defaults/kubicd/rbac.conf", "/etc/kubicd/rbac.conf")

if rbac_err != nil {
log.Error ("Error opening rbac config file: %v", rbac_err)
return false
Expand Down

0 comments on commit 7d727cb

Please sign in to comment.