From 509a302c0323844b4b21642e971826ffa3e31de9 Mon Sep 17 00:00:00 2001 From: RebeccaMahany Date: Mon, 30 Dec 2024 13:48:10 -0500 Subject: [PATCH] Add updated path for ws1HubUtil --- ee/allowedcmd/cmd_linux.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ee/allowedcmd/cmd_linux.go b/ee/allowedcmd/cmd_linux.go index 064d9da20..32aa870e4 100644 --- a/ee/allowedcmd/cmd_linux.go +++ b/ee/allowedcmd/cmd_linux.go @@ -160,7 +160,16 @@ func Systemctl(ctx context.Context, arg ...string) (*exec.Cmd, error) { } func Ws1HubUtil(ctx context.Context, arg ...string) (*exec.Cmd, error) { - return validatedCommand(ctx, "/opt/vmware/ws1-hub/bin/ws1HubUtil", arg...) + for _, p := range []string{"/usr/bin/ws1HubUtil", "/opt/vmware/ws1-hub/bin/ws1HubUtil"} { + validatedCmd, err := validatedCommand(ctx, p, arg...) + if err != nil { + continue + } + + return validatedCmd, nil + } + + return nil, errors.New("ws1HubUtil not found") } func XdgOpen(ctx context.Context, arg ...string) (*exec.Cmd, error) {