[issue36017] test_grp

2020-03-16 Thread Matthias Braun


Change by Matthias Braun :


--
keywords: +patch
nosy: +Matthias Braun
nosy_count: 1.0 -> 2.0
pull_requests: +18382
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19033

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36017] test_grp

2019-02-17 Thread Mathijs Brands


New submission from Mathijs Brands :

# Choose a non-existent gid.
fakegid = 4127
while fakegid in bygids:
fakegid = (fakegid * 3) % 0x1

self.assertRaises(KeyError, grp.getgrgid, fakegid)

When a Linux system is configured to use LDAP for user and group information, 
there is no guarantee that grp.getgrall will actually return a complete list of 
all configured groups.

In my case, grp.getgrall only returns 58 groups, while there are actually tens 
of thousands of groups (every user has their own group, which generally only 
has one member). The groups return by grp.getgrall are the 'system' groups 
(things like daemon, wheel, etc). In our case 4127 is an existing group and 
grp.getgrid can query information for it (and does not thrown the expected 
KeyError, since it is a valid group).

Perhaps this unit test should not rely on getgrall, but relying on getgrid on 
the test for getgrid itself is also problematic.

I have seen this LDAP setup, where getgrall does not return the full set of 
groups, at two different parties with lots of users (and Novell eDirectory).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36017] test_grp

2019-02-17 Thread Mathijs Brands


Change by Mathijs Brands :


--
components: Tests
nosy: mjbrands
priority: normal
severity: normal
status: open
title: test_grp
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com