Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
69f55d14
Commit
69f55d14
authored
May 18, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getgroups max on Linux is bigger than I thought.
R=iant DELTA=3 (2 added, 0 deleted, 1 changed) OCL=28994 CL=29003
parent
be869ba4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
user.go
src/lib/os/user.go
+3
-1
No files found.
src/lib/os/user.go
View file @
69f55d14
...
...
@@ -44,7 +44,9 @@ func Getgroups() ([]int, os.Error) {
return
nil
,
ErrnoToError
(
err
);
}
if
r1
<
0
||
r1
>
1024
{
// the current max is 16; 1024 is a future-proof sanity check
// Sanity check group count.
// On Linux, max is 1<<16; on BSD, OS X, max is 16.
if
r1
<
0
||
r1
>
1
<<
20
{
return
nil
,
EINVAL
;
}
a
:=
make
([]
int
,
r1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment