Comments (1)
Far seems to use getpwent() when generating the list
Simple test on latest MacOS
while ((pw = getpwent()) != NULL)
std::cout << pw->pw_name << " " << pw->pw_uid << "\n";`
shows duplicates when output is sorted
daemon 1
daemon 1
nobody 4294967294
nobody 4294967294
root 0
root 0
Documentation man getpwent states that the information is obtained from opendirectoryd
With fairly default configuration with no external directories added
% odutil show nodenames
Nodenames:
Name State Refs Type External Locked Hidden
----------------- ------ ---- ---- -------- ------ ------
/Active Directory Online 1 X X
/Configure Online 1 X X
/Contacts Online 3
/LDAPv3 Online 1 X X
/Local Online 2 X X
/Local/Default Online 63 X
/Platform SSO Online 1 X
/Search Online 26
username nobody is found in two locations
% dscl localhost -list /Search/Users |grep nobody
nobody
% dscl localhost -list /Local/Default/Users |grep nobody
nobody
That's probably the source of duplicates on Mac.
Also FreeBSD man page for getpwent explicitly states "The getpwent() and getpwent_r() functions make
no attempt to suppress duplicate information if multiple sources are
specified in nsswitch.conf(5)"
So the issue is not Mac-specific. It seems to be good to remove duplicates from the list obtained from getpwent
from far2l.
Related Issues (20)
- far2l --tty key macros HOT 1
- Package for 10.15 not available in release for v2.6.1 HOT 2
- Unicode issues left — metabug
- Wayland issues left — metabug HOT 1
- F11 and combols doesn't work HOT 1
- 32-bit failed to build HOT 2
- New pick color features are not available in Options|Colors dialog HOT 1
- Pick color: highlighting with "Style" more than needed HOT 5
- Regarding files highlighting masks: use regexps instead of globs? HOT 7
- Files highlighting masks: minor correction needed HOT 1
- Files highlighting marks symbols by default: remove or change with mc tradition HOT 12
- Wrong cask url in homebrew, please fix it. HOT 1
- Fix 'Align file extensions'
- "Test archive" command leads to /dev/null corruption if run with privilege elevation
- Consider switching (back?) to codecvt as an alternative to iconv and Wine charset routines HOT 4
- Suggestion to use `find_package()` over `pkg_search_module()` for better logs
- Crash in colorer(?) HOT 6
- Function Menu: BreakKeys problem
- Colorer failed to build on ARM HOT 1
- Black and white mode is no longer pure black and white
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from far2l.