[PR #384] [MERGED] Use id command for user lookup on MacOS #12558

Closed
opened 2026-08-05 02:06:11 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/384
Author: @mlsmaycon
Created: 7/7/2022
Status: Merged
Merged: 7/7/2022
Merged by: @mlsmaycon

Base: mainHead: handle-user-lookup-mac


📝 Commits (2)

  • 0248e67 Use id command for user lookup on MacOS
  • 6a2c85a rename func to idUserNameLookup

📊 Changes

3 files changed (+58 additions, -1 deletions)

View changed files

client/ssh/lookup.go (+10 -0)
client/ssh/lookup_darwin.go (+47 -0)
📝 client/ssh/server.go (+1 -1)

📄 Description

When building client without CGO, user.Lookup
attempts to get user from /etc/passwd
Which doesn't have the user as MacOS uses
opendirectoryd as user directory


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/384 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 7/7/2022 **Status:** ✅ Merged **Merged:** 7/7/2022 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `handle-user-lookup-mac` --- ### 📝 Commits (2) - [`0248e67`](https://github.com/netbirdio/netbird/commit/0248e6712bf9b9806bd98fd2e108e8fb56002bd9) Use id command for user lookup on MacOS - [`6a2c85a`](https://github.com/netbirdio/netbird/commit/6a2c85a7a28b469f24102239ecf7090a90864dfa) rename func to idUserNameLookup ### 📊 Changes **3 files changed** (+58 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `client/ssh/lookup.go` (+10 -0) ➕ `client/ssh/lookup_darwin.go` (+47 -0) 📝 `client/ssh/server.go` (+1 -1) </details> ### 📄 Description When building client without CGO, user.Lookup attempts to get user from /etc/passwd Which doesn't have the user as MacOS uses opendirectoryd as user directory --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:06:11 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12558