1570af302Sopenharmony_ci// commit fc5a96c9c8aa186effad7520d5df6b616bbfd29d
2570af302Sopenharmony_ci// getpwnam_r should not crash on nonexistant users when errno is 0
3570af302Sopenharmony_ci
4570af302Sopenharmony_ci#include <pwd.h>
5570af302Sopenharmony_ci#include "test.h"
6570af302Sopenharmony_ci
7570af302Sopenharmony_ciint main(void)
8570af302Sopenharmony_ci{
9570af302Sopenharmony_ci	struct passwd *pw, pwbuf;
10570af302Sopenharmony_ci	char buf[1024];
11570af302Sopenharmony_ci	getpwnam_r("nonsensical_user", &pwbuf, buf, sizeof buf, &pw);
12570af302Sopenharmony_ci	return t_status;
13570af302Sopenharmony_ci}
14