malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.25k stars 31 forks source link

Yori does not detect localized "Administrators" group #69

Closed ghost closed 3 years ago

ghost commented 4 years ago

On localized Windows, group "Administrators" is (often) renamed to something else, so Yori fails to detect administrator permissions. In user scripts, grpcmp says:

grpcmp: could not find group: No mapping between account names and security IDs was done.
malxau commented 4 years ago

I'm not entirely sure what the best thing to do here is. It's nice that grpcmp can operate on arbitrary groups, but I see why not being portable across locales is a problem for scripts. I pushed commit 052b881f222a6f346b6ba3490d310350be41eb87 which allows grpcmp to use a -b switch to use a builtin string rather than the system's group name, but obviously the problem with this approach is that grpcmp needs to know about every well known string that the user might want to query. As of now I've only included Administrators, although this could potentially be a table of strings in future.

Let me know if you can see a better approach for this.

malxau commented 3 years ago

This should be fixed in 1.50, released today. Please let me know if there are further related issues.