예제 #1
0
파일: nsstest.c 프로젝트: tridge/junkcode
 int main(int argc, char *argv[])
{	
	char *p;

	if (argc > 1) so_path = argv[1];

	p = strrchr(so_path, '_');
	if (!p) {
		printf("Badly formed name for .so - must be libnss_FOO.so\n");
		exit(1);
	}
	nss_name = strdup(p+1);
	p = strchr(nss_name, '.');
	if (p) *p = 0;

	printf("so_path=%s nss_name=%s\n\n", so_path, nss_name);

	nss_test_users();
	nss_test_groups();
	nss_test_errors();

	printf("total_errors=%d\n", total_errors);

	return total_errors;
}
예제 #2
0
 int main(int argc, char *argv[])
{	
	if (argc > 1) so_path = argv[1];
	if (argc > 2) nss_name = argv[2];

	nss_test_users();
	nss_test_groups();
	nss_test_errors();

	printf("total_errors=%d\n", total_errors);

	return total_errors;
}