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.

78 lines
2.3 KiB

  1. --- a/source4/torture/local/nss_tests.c
  2. +++ b/source4/torture/local/nss_tests.c
  3. @@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct tortu
  4. return true;
  5. }
  6. -
  7. static bool test_getgrgid(struct torture_context *tctx,
  8. gid_t gid,
  9. struct group *grp_p)
  10. @@ -333,6 +332,7 @@ static bool test_enum_passwd(struct tort
  11. return true;
  12. }
  13. +#if HAVE_GETPWENT_R
  14. static bool test_enum_r_passwd(struct torture_context *tctx,
  15. struct passwd **pwd_array_p,
  16. size_t *num_pwd_p)
  17. @@ -383,6 +383,7 @@ static bool test_enum_r_passwd(struct to
  18. return true;
  19. }
  20. +#endif
  21. static bool torture_assert_passwd_equal(struct torture_context *tctx,
  22. const struct passwd *p1,
  23. @@ -434,7 +435,7 @@ static bool test_passwd_r(struct torture
  24. struct passwd *pwd, pwd1, pwd2;
  25. size_t num_pwd;
  26. - torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
  27. + torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
  28. "failed to enumerate passwd");
  29. for (i=0; i < num_pwd; i++) {
  30. @@ -462,7 +463,7 @@ static bool test_passwd_r_cross(struct t
  31. struct passwd *pwd, pwd1, pwd2, pwd3, pwd4;
  32. size_t num_pwd;
  33. - torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd),
  34. + torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd),
  35. "failed to enumerate passwd");
  36. for (i=0; i < num_pwd; i++) {
  37. @@ -533,6 +534,7 @@ static bool test_enum_group(struct tortu
  38. return true;
  39. }
  40. +#if HAVE_GETGRENT_R
  41. static bool test_enum_r_group(struct torture_context *tctx,
  42. struct group **grp_array_p,
  43. size_t *num_grp_p)
  44. @@ -583,6 +585,7 @@ static bool test_enum_r_group(struct tor
  45. return true;
  46. }
  47. +#endif
  48. static bool torture_assert_group_equal(struct torture_context *tctx,
  49. const struct group *g1,
  50. @@ -639,7 +642,7 @@ static bool test_group_r(struct torture_
  51. struct group *grp, grp1, grp2;
  52. size_t num_grp;
  53. - torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
  54. + torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
  55. "failed to enumerate group");
  56. for (i=0; i < num_grp; i++) {
  57. @@ -667,7 +670,7 @@ static bool test_group_r_cross(struct to
  58. struct group *grp, grp1, grp2, grp3, grp4;
  59. size_t num_grp;
  60. - torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp),
  61. + torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp),
  62. "failed to enumerate group");
  63. for (i=0; i < num_grp; i++) {