hashicorp / hashicorp/go-secure-stdlib

mlock and password do not build on AIX (GOOS=aix)

Open Beginner friendly
#189 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
74
Forks
28
PR merge metrics
No merged PRs in 30d

Description

## Description

The `mlock` and `password` modules fail to compile for `GOOS=aix GOARCH=ppc64`:

```
mlock/mlock.go:17:9: undefined: lockMemory
password/password.go:34:23: undefined: read
```

Neither `mlock_unix.go` nor `password_unix.go` includes `aix` in its build constraint, so the platform falls through to no implementation at all (mlock does not even reach `mlock_unavail.go`, whose constraint also excludes aix).

AIX supports both underlying facilities: `syscall.Mlockall` / `plock` semantics used by `mlock_unix.go`, and the termios reads used by `password_unix.go` both compile and run on `aix/ppc64` with the stock Go toolchain.

## Use case

Building Vault's CLI/Agent for AIX on IBM Power. The IBM Power integration team has been carrying this as a one-line fork patch (adding `aix` to the two build constraints) and it has been validated in their AIX builds.

## Proposed fix

Add `aix` to the build constraints of `mlock/mlock_unix.go` and `password/password_unix.go`. PR to follow.

Contributor guide

Open the contributing guide

Research direction

Start with mlock/mlock_unix.go and password/password_unix.go, then compare their build constraints with the AIX failure paths reported in the issue. Update the constraints for AIX and verify that the modules compile for GOOS=aix GOARCH=ppc64 with the stock Go toolchain.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.