When I add a user to a group (gid=3000) which has 63 members suddenly all users are removed from the group.
executing id [user] showed following in debug:
_nss_mysql_run_query: Executing query: SELECT username FROM grouplist WHERE gid='3000'
_nss_mysql_connect_sql: ENTER
_nss_mysql_check_existing_connection: ENTER
_nss_mysql_validate_socket: ENTER
_nss_mysql_is_same_sockaddr: ENTER
_nss_mysql_is_same_sockaddr: EXIT (TRUE)
_nss_mysql_is_same_sockaddr: ENTER
_nss_mysql_is_same_sockaddr: EXIT (TRUE)
_nss_mysql_validate_socket: EXIT (TRUE)
_nss_mysql_check_existing_connection: EXIT (TRUE)
_nss_mysql_connect_sql: Using existing connection
_nss_mysql_connect_sql: EXIT (NSS_SUCCESS)
_nss_mysql_run_query: EXIT (NSS_SUCCESS)
_nss_mysql_load_memsbygid: ENTER
_nss_mysql_fetch_row: ENTER
_nss_mysql_fetch_row: EXIT (NSS_SUCCESS)
[ removed multiple repeats of same 2 lines]
_nss_mysql_fetch_row: ENTER
_nss_mysql_fetch_row: EXIT (NSS_SUCCESS)
_nss_mysql_load_memsbygid: EXIT (NSS_TRYAGAIN)
_nss_mysql_close_result: ENTER
_nss_mysql_close_result, calling mysql_free_result()
_nss_mysql_close_result: EXIT
_nss_mysql_lookup: EXIT (NSS_TRYAGAIN)
_nss_mysql_load_group: EXIT (NSS_TRYAGAIN)
_nss_mysql_lookup: EXIT (NSS_TRYAGAIN)
_nss_mysql_getgrent_r: EXIT (NSS_TRYAGAIN)
When i remove the grouplist record, other users are back in the group. logging shows:
_nss_mysql_load_memsbygid: EXIT (NSS_SUCCESS)
_nss_mysql_close_result: ENTER
_nss_mysql_close_result, calling mysql_free_result()
_nss_mysql_close_result: EXIT
_nss_mysql_lookup: EXIT (NSS_SUCCESS)
_nss_mysql_load_group: EXIT (NSS_SUCCESS)
_nss_mysql_lookup: EXIT (NSS_SUCCESS)
_nss_mysql_getgrent_r: EXIT (NSS_SUCCESS)
Logged In: YES
user_id=550319
Originator: NO
What OS?
The NSS_TRYAGAIN is supposed to make the OS' NSS API re-enter my code with a bigger buffer to handle the situation.
If you try to do the same thing with /etc/group (exactly the same user and group names), does it fail and/or truncate the results?
Logged In: YES
user_id=873770
Originator: YES
When i add the membership to /etc/groups everything is fine.
It does not matter which username i try to make member of one of the groups. After i add the membership, the group is no longer available.
Above you find part of the debug info running 'id' when the group is gone and after that the succeeding calls when i remove the membership.