4kux / winsvc

Automatically exported from code.google.com/p/winsvc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Runtime error when interactive user is in too many groups (?) #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, probably not a common occurrence, but when I use the 
svc.IsAnInteractiveSession as a user in a lot of groups it panics due to the 
size of the syscall.SIDAndAttributes array (svc/security.go:84).

I'm not much of a programmer and i'm even newer with golang so I'm not sure if 
this length can somehow be defined at runtime.  I can fix it by increasing it 
to an arbitary value > gs.GroupCount but obviously this will just fix it for a 
set number of groups returned on the token.

What steps will reproduce the problem?
1. Run code from example folder as a user in a large number of groups 
(gs.GroupCount > 256)

What version of the product are you using? On what operating system?
Windows 7 64 bit, golang 1.3.3 or 1.4.2

Please provide any additional information below.
Trace attached

Original issue reported on code.google.com by j...@jmn.id.au on 1 Apr 2015 at 3:56

Attachments:

GoogleCodeExporter commented 8 years ago
It was unreasonable of me to assume groups are so small. I propose we change 
max group size to much larger value - this should be large enough for everyone. 
Here https://codereview.appspot.com/217650043/ my proposed change. Please 
review it. Thank you.

Alex

Original comment by alex.bra...@gmail.com on 1 Apr 2015 at 11:10

GoogleCodeExporter commented 8 years ago
That will definitely fix it for me!  For reference, I was getting a 
gs.GroupCount of 317, if anyone gets near 2 << 20 I would be highly surprised.

Thank you!

Original comment by j...@jmn.id.au on 1 Apr 2015 at 11:34

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 338ee825126c.

Original comment by alex.bra...@gmail.com on 1 Apr 2015 at 11:37