You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.6 KiB

  1. diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c
  2. index 2cd6122..04f13c6 100644
  3. --- a/source4/torture/local/nss_tests.c
  4. +++ b/source4/torture/local/nss_tests.c
  5. @@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx,
  6. return true;
  7. }
  8. -
  9. static bool test_getgrgid(struct torture_context *tctx,
  10. gid_t gid,
  11. struct group *grp_p)
  12. @@ -333,6 +332,7 @@ static bool test_enum_passwd(struct torture_context *tctx,
  13. return true;
  14. }
  15. +#if HAVE_GETPWENT_R
  16. static bool test_enum_r_passwd(struct torture_context *tctx,
  17. struct passwd **pwd_array_p,
  18. size_t *num_pwd_p)
  19. @@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx,
  20. return true;
  21. }
  22. +#endif
  23. static bool torture_assert_passwd_equal(struct torture_context *tctx,
  24. const struct passwd *p1,
  25. @@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture_context *tctx)
  26. struct passwd *pwd, pwd1, pwd2;
  27. size_t num_pwd;
  28. - torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
  29. + torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
  30. "failed to enumerate passwd");
  31. for (i=0; i < num_pwd; i++) {
  32. @@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx)
  33. struct passwd *pwd, pwd1, pwd2, pwd3, pwd4;
  34. size_t num_pwd;
  35. - torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
  36. + torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
  37. "failed to enumerate passwd");
  38. for (i=0; i < num_pwd; i++) {
  39. @@ -531,6 +532,7 @@ static bool test_enum_group(struct torture_context *tctx,
  40. return true;
  41. }
  42. +#if HAVE_GETGRENT_R
  43. static bool test_enum_r_group(struct torture_context *tctx,
  44. struct group **grp_array_p,
  45. size_t *num_grp_p)
  46. @@ -579,6 +581,7 @@ static bool test_enum_r_group(struct torture_context *tctx,
  47. return true;
  48. }
  49. +#endif
  50. static bool torture_assert_group_equal(struct torture_context *tctx,
  51. const struct group *g1,
  52. @@ -635,7 +638,7 @@ static bool test_group_r(struct torture_context *tctx)
  53. struct group *grp, grp1, grp2;
  54. size_t num_grp;
  55. - torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
  56. + torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
  57. "failed to enumerate group");
  58. for (i=0; i < num_grp; i++) {
  59. @@ -663,7 +666,7 @@ static bool test_group_r_cross(struct torture_context *tctx)
  60. struct group *grp, grp1, grp2, grp3, grp4;
  61. size_t num_grp;
  62. - torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
  63. + torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
  64. "failed to enumerate group");
  65. for (i=0; i < num_grp; i++) {