-
Notifications
You must be signed in to change notification settings - Fork 668
Build fails on OpenBSD: pkg/privileges/privileges.go:6:17: undefined: isPrivileged #976
Copy link
Copy link
Closed
Labels
Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Nothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.
Description
Naabu version:
v2.2.1
Current Behavior:
On OpenBSD 7.4, the build fails in the same way as it did for FreeBSD in #782.
github.com/projectdiscovery/naabu/v2/pkg/privileges
# github.com/projectdiscovery/naabu/v2/pkg/privileges
go/pkg/mod/github.com/projectdiscovery/naabu/v2@v2.2.1/pkg/privileges/privileges.go:6:17: undefined: isPrivileged
Expected Behavior:
A successful build without that error.
Steps To Reproduce:
On OpenBSD 7.4, install Go and then run go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@v2.2.1.
Anything else:
$ go version
go version go1.21.1 openbsd/amd64
Also, the code required to patch this probably looks similar to #856. I threw this together and it works on OpenBSD, so os.Geteuid is supported:
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println(os.Geteuid())
}
Maybe it makes sense to generalize the fix for this somehow so that other systems (NetBSD, Dragonfly BSD) have a chance of working as well? Not sure how to do this offhand, I've only written really minor things in Go.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Nothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.