Please add sg(1) (set group)

Open
#81 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start by reading the referenced tests/winsg/winsg.c example and inspect the repository's existing command entry points for how Windows-specific commands are structured. Trace how commands launch processes and handle effective group behavior. Done means sg(1) is available on Windows, runs a requested command with the selected group, and has coverage matching the supported behavior.

Written by the indexing model from the issue text.

Description

C-feature E-help-wanted I-upstream P-backlog

Please add sg(1) (set group).

/usr/bin/sg runs a command with a different ugid (effective gid). Windows supports this, by changing the TOKEN_PRIMARY_GROUP of a process or thread, and then start a new process/command.

Windows fully supports this, as demonstrated in ServicesForUNIX (SFU), Cygwin, MSYS2, UWIN, ...

Example code can be found in https://github.com/kofemann/ms-nfs41-client/blob/master/tests/winsg/winsg.c

Dominant language
Rust
Stars
5.2k
Forks
107
Avg merge
2d 19h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/coreutils

All issues in microsoft/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.