diff -aur samba-3.6.25/source3/configure ../build/extbld/third_party/samba/core/samba-3.6.25/source3/configure
--- samba-3.6.25/source3/configure	2015-02-22 17:16:23.000000000 +0300
+++ ../build/extbld/third_party/samba/core/samba-3.6.25/source3/configure	2021-08-14 13:55:13.000865392 +0300
@@ -13289,58 +13289,58 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libreplace_cv_HAVE_GETADDRINFO" >&5
 $as_echo "$libreplace_cv_HAVE_GETADDRINFO" >&6; }
 
-if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
-	# getaddrinfo is broken on some AIX systems
-	# see bug 5910, use our replacements if we detect
-	# a broken system.
-	if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-		#include <stddef.h>
-		#include <sys/types.h>
-		#include <sys/socket.h>
-		#include <netdb.h>
-		int main(int argc, const char *argv[])
-		{
-			struct addrinfo hints = {0,};
-			struct addrinfo *ppres;
-			const char hostname1[] = "0.0.0.0";
-			const char hostname2[] = "127.0.0.1";
-			const char hostname3[] = "::";
-			hints.ai_socktype = SOCK_STREAM;
-			hints.ai_family = AF_UNSPEC;
-			hints.ai_flags =
-				AI_NUMERICHOST|AI_PASSIVE|AI_ADDRCONFIG;
-			/* Test for broken flag combination on AIX. */
-			if (getaddrinfo(hostname1, NULL, &hints, &ppres) == EAI_BADFLAGS) {
-				/* This fails on an IPv6-only box, but not with
-				   the EAI_BADFLAGS error. */
-				return 1;
-			}
-			if (getaddrinfo(hostname2, NULL, &hints, &ppres) == 0) {
-				/* IPv4 lookup works - good enough. */
-				return 0;
-			}
-			/* Uh-oh, no IPv4. Are we IPv6-only ? */
-			return getaddrinfo(hostname3, NULL, &hints, &ppres) != 0 ? 1 : 0;
-		}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  libreplace_cv_HAVE_GETADDRINFO=yes
-else
-  libreplace_cv_HAVE_GETADDRINFO=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
+#if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
+#	# getaddrinfo is broken on some AIX systems
+#	# see bug 5910, use our replacements if we detect
+#	# a broken system.
+#	if test "$cross_compiling" = yes; then :
+#  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+#as_fn_error $? "cannot run test program while cross compiling
+#See \`config.log' for more details" "$LINENO" 5; }
+#else
+#  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+#/* end confdefs.h.  */
+#
+#		#include <stddef.h>
+#		#include <sys/types.h>
+#		#include <sys/socket.h>
+#		#include <netdb.h>
+#		int main(int argc, const char *argv[])
+#		{
+#			struct addrinfo hints = {0,};
+#			struct addrinfo *ppres;
+#			const char hostname1[] = "0.0.0.0";
+#			const char hostname2[] = "127.0.0.1";
+#			const char hostname3[] = "::";
+#			hints.ai_socktype = SOCK_STREAM;
+#			hints.ai_family = AF_UNSPEC;
+#			hints.ai_flags =
+#				AI_NUMERICHOST|AI_PASSIVE|AI_ADDRCONFIG;
+#			/* Test for broken flag combination on AIX. */
+#			if (getaddrinfo(hostname1, NULL, &hints, &ppres) == EAI_BADFLAGS) {
+#				/* This fails on an IPv6-only box, but not with
+#				   the EAI_BADFLAGS error. */
+#				return 1;
+#			}
+#			if (getaddrinfo(hostname2, NULL, &hints, &ppres) == 0) {
+#				/* IPv4 lookup works - good enough. */
+#				return 0;
+#			}
+#			/* Uh-oh, no IPv4. Are we IPv6-only ? */
+#			return getaddrinfo(hostname3, NULL, &hints, &ppres) != 0 ? 1 : 0;
+#		}
+#_ACEOF
+#if ac_fn_c_try_run "$LINENO"; then :
+#  libreplace_cv_HAVE_GETADDRINFO=yes
+#else
+#  libreplace_cv_HAVE_GETADDRINFO=no
+#fi
+#rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+#  conftest.$ac_objext conftest.beam conftest.$ac_ext
+#fi
+#
+#fi
 
 if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
 
diff -aur samba-3.6.25/source3/rpc_server/samr/srv_samr_chgpasswd.c ../build/extbld/third_party/samba/core/samba-3.6.25/source3/rpc_server/samr/srv_samr_chgpasswd.c
--- samba-3.6.25/source3/rpc_server/samr/srv_samr_chgpasswd.c	2015-02-22 17:11:32.000000000 +0300
+++ ../build/extbld/third_party/samba/core/samba-3.6.25/source3/rpc_server/samr/srv_samr_chgpasswd.c	2021-08-14 14:00:57.350398161 +0300
@@ -639,7 +639,7 @@
 
 #else /* ALLOW_CHANGE_PASSWORD */
 
-bool chgpasswd(const char *name, const struct passwd *pass,
+bool chgpasswd(const char *name, const char *rhost, const struct passwd *pass,
 	       const char *oldpass, const char *newpass, bool as_root)
 {
 	DEBUG(0, ("chgpasswd: Unix Password changing not compiled in (user=%s)\n", name));
