nsswitch.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. diff -Nuar a/nsswitch/nsstest.c b/nsswitch/nsstest.c
  2. --- a/nsswitch/nsstest.c 2019-12-06 12:46:56.000000000 +0300
  3. +++ b/nsswitch/nsstest.c 2020-11-03 13:50:40.318374062 +0300
  4. @@ -137,7 +137,7 @@
  5. return &pwd;
  6. }
  7. -static void nss_setpwent(void)
  8. +static void nss_setpwent2(void)
  9. {
  10. NSS_STATUS (*_nss_setpwent)(void) =
  11. (NSS_STATUS(*)(void))find_fn("setpwent");
  12. @@ -146,13 +146,13 @@
  13. if (!_nss_setpwent)
  14. return;
  15. - status = _nss_setpwent();
  16. + status = _nss_setpwent2();
  17. if (status != NSS_STATUS_SUCCESS) {
  18. report_nss_error("setpwent", status);
  19. }
  20. }
  21. -static void nss_endpwent(void)
  22. +static void nss_endpwent2(void)
  23. {
  24. NSS_STATUS (*_nss_endpwent)(void) =
  25. (NSS_STATUS (*)(void))find_fn("endpwent");
  26. @@ -161,7 +161,7 @@
  27. if (!_nss_endpwent)
  28. return;
  29. - status = _nss_endpwent();
  30. + status = _nss_endpwent2();
  31. if (status != NSS_STATUS_SUCCESS) {
  32. report_nss_error("endpwent", status);
  33. }
  34. @@ -290,7 +290,7 @@
  35. return &grp;
  36. }
  37. -static void nss_setgrent(void)
  38. +static void nss_setgrent2(void)
  39. {
  40. NSS_STATUS (*_nss_setgrent)(void) =
  41. (NSS_STATUS (*)(void))find_fn("setgrent");
  42. @@ -299,13 +299,13 @@
  43. if (!_nss_setgrent)
  44. return;
  45. - status = _nss_setgrent();
  46. + status = _nss_setgrent2();
  47. if (status != NSS_STATUS_SUCCESS) {
  48. report_nss_error("setgrent", status);
  49. }
  50. }
  51. -static void nss_endgrent(void)
  52. +static void nss_endgrent2(void)
  53. {
  54. NSS_STATUS (*_nss_endgrent)(void) =
  55. (NSS_STATUS (*)(void))find_fn("endgrent");
  56. @@ -314,7 +314,7 @@
  57. if (!_nss_endgrent)
  58. return;
  59. - status = _nss_endgrent();
  60. + status = _nss_endgrent2();
  61. if (status != NSS_STATUS_SUCCESS) {
  62. report_nss_error("endgrent", status);
  63. }
  64. @@ -402,7 +402,7 @@
  65. {
  66. struct passwd *pwd;
  67. - nss_setpwent();
  68. + nss_setpwent2();
  69. /* loop over all users */
  70. while ((pwd = nss_getpwent())) {
  71. printf("Testing user %s\n", pwd->pw_name);
  72. @@ -424,14 +424,14 @@
  73. printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid);
  74. printf("\n");
  75. }
  76. - nss_endpwent();
  77. + nss_endpwent2();
  78. }
  79. static void nss_test_groups(void)
  80. {
  81. struct group *grp;
  82. - nss_setgrent();
  83. + nss_setgrent2();
  84. /* loop over all groups */
  85. while ((grp = nss_getgrent())) {
  86. printf("Testing group %s\n", grp->gr_name);
  87. @@ -452,7 +452,7 @@
  88. printf("getgrgid: "); print_group(grp);
  89. printf("\n");
  90. }
  91. - nss_endgrent();
  92. + nss_endgrent2();
  93. }
  94. static void nss_test_errors(void)