Skip to content

Commit

Permalink
Make socket path length shorter for launcher interactive (#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Dec 3, 2024
1 parent d794621 commit f668827
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/osquery/interactive/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ func StartProcess(knapsack types.Knapsack, interactiveRootDir string) (*os.Proce
return nil, nil, fmt.Errorf("creating root dir for interactive mode: %w", err)
}

socketPath := osqueryRuntime.SocketPath(interactiveRootDir, ulid.New())
// We need a shorter ulid to avoid running into socket path length issues.
socketId := ulid.New()
truncatedSocketId := socketId[len(socketId)-4:]
socketPath := osqueryRuntime.SocketPath(interactiveRootDir, truncatedSocketId)
augeasLensesPath := filepath.Join(interactiveRootDir, "augeas-lenses")

// only install augeas lenses on non-windows platforms
Expand Down

0 comments on commit f668827

Please sign in to comment.