Hello,
What is a purpose of invertion of result_status in _nss_exec_getpwent_r_locked ?
NSS_STATUS_SUCCESS is 1.
From the _nss_exec_getpwent_r_locked return will be NSS_STATUS_SUCCESS even if it get error from nss_exec_script_long.
That may cause infinite loop when getpwent is used to enumerate users because getpwent will always return pointer instead of 0.
https://github.com/tests-always-included/libnss_exec/blob/master/nss_exec-passwd.c#L86