Skip to content

Commit

Permalink
Add get_effective_groups() for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
syrmel committed Nov 28, 2024
1 parent e9792ce commit b9f28c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/pwd/pwd_nix.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn get_groups(username string) ![]int {
}
}

pub fn get_effective_groups_up_to(limit int) !(int, []int) {
fn get_effective_groups_up_to(limit int) !(int, []int) {
mut groups := []int{len: init_group_buf_size}
unsafe {
num_groups := C.getgroups(limit, &groups[0])
Expand Down
4 changes: 4 additions & 0 deletions common/pwd/pwd_windows.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub fn get_userinfo_for_name(username string) !UserInfo {
return error('Not supported on Windows')
}

pub fn get_effective_groups() ![]int {
return error('Not supported on Windows')
}

pub fn whoami() !string {
username := os.loginname() or { '' }
if username == '' {
Expand Down

0 comments on commit b9f28c2

Please sign in to comment.