Ubuntu学习笔记之调试Samba

调试samba

我们工作中经常的会使用samba。
但是出现一个棘手的问题我们应该怎么办呢?网上查资料查解决方案?
还是自己下一套samba的源码分析一番呢?

本文介绍了工作中遇到的一个问题。
然后通过查看源码来分析为什么会出这个错误。
以及最后应该怎么解决这个错误。

参考https://wiki.ubuntu.com/DebuggingSamba这个。
我们先看看这个wiki上介绍的怎么调试samba的吧

Introduction(介绍)

Samba is a complex package, because it covers a wide range of use cases and provides lots of different binary packages.

Bugs relating to the samba source package typically fall into one of the following categories:(一般分为下面几种场景)

1.User cannot connect to (or properly access files on) a remote share from his Ubuntu system. This falls under the category of samba as a client.

2.Other systems cannot connect to (or properly access files on) an Ubuntu system providing samba shares. This may be an issue with samba as a server.

3.Install/upgrade failures of the samba packages.

4.libpam-smbpass specific issues. Sharing a folder from the GUI installs libpam-smbpass, which stacks a PAM module that maintains sync between system and samba passwords. Failure in libpam-smbpass may result in inability to login on the system.

5.winbind specific issues. Winbind allows to get user/group info from a Windows DC. It is sometimes installed by unsuspecting users as a recommended package from Wine.

Also, it is a very good idea to have a look at the official Samba HOWTO. You will find there not only a how-to, but also common errors.

How to file(如何定位哪个)

First figure out if the bug falls under one of the generic categories:

1.samba as a client

2.samba as a server

3.install/upgrade failure

4.libpam-smbpass related

5.winbind related

Samba as a client(samba作为客户端来使用)

IS IT A REGRESSION ?
Did this use to work properly with a previous release ?

WHAT VERSION OF SAMBA PACKAGES ARE USED ?
Please give the output of:

dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
HOW IS THE REMOTE SHARE ACCESSED FROM THE UBUNTU SYSTEM?
nautilus (or other GUI client)
smbclient (from the command line)
cifs filesystem mount (from /etc/fstab or a mount command)
IF NAUTILUS (OR ANOTHER GUI CLIENT) IS USED TO ACCESS THE REMOTE SHARE, CAN THE SHARE BE ACCESSED WITH THE SMBCLIENT COMMAND LINE UTILITY ?
To test:

install the samba-client package
try to connect to the remote system from the command line:

smbclient //remote_system/share_name
If the share requires a specific username/password, try using the "-U" parameter (for example, use "-U ntdomain\\user").

IF A CIFS MOUNT IS USED
In that case please also provide:

the content of the file /etc/fstab, or the command line used to mount the remote share if the share is manually mounted.

the content of the file /proc/fs/cifs/DebugData

WHAT IS THE REMOTE SERVER ?
In all cases, please include the output of the following smbclient command:


smbclient -L //remote_system
This should give us the remote server version. Also include on what kind of machine the share is located (Windows 2003 Server, Ubuntu 8.04, NAS box model...)

Samba as a server(samba作为服务端来使用)

IS IT A REGRESSION ?
Did this use to work properly with a previous release ?

WHAT VERSION OF SAMBA PACKAGES ARE USED ?
Please give the output of:

dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
WHICH CLIENTS ARE FAILING TO CONNECT?
Include the operating system (Windows, Ubuntu) and version (XP, Vista, 8.04) of the client systems failing to connect to the share.

WHAT IS THE ERROR MESSAGE PRODUCED ON THE CLIENT?
OTHER INFORMATION TO INCLUDE
the content of the /etc/samba/smb.conf file

log files found in /var/log/samba/

the output of the smbclient -L //server/

the output of testparm -s

Install/upgrade failure(安装、升级时候报错)

STATUS OF SAMBA PACKAGES ON THE SYSTEM
Please give the output of:

dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
OTHER INFORMATION TO INCLUDE
apt and dpkg log files: /var/log/dpkg.log and /var/log/apt/term.log.

/etc/samba/smb.conf (or absence thereof)

In the case of an upgrade was there a prompt for a modified configuration file? If so what steps were taken.

How to Triage(如何鉴别分类)

Identify if the bug falls in one of the generic categories above. If so make sure that the relevant information is available. If not ask for it using one of the stock replies.


Samba as a client


If nautilus fails to connect but smbclient can successfully connect, the bug is related to nautilus. Mark the samba task Invalid and open a new task for nautilus.

If both nautilus and smbclient can not connect, the bug is related to samba.

If cifs cannot connect the bug might be related to CIFS kernelspace (package linux) or userspace (package samba). In doubt, leave it in samba.

Stock Reply(回复)


SAMBA AS A CLIENT
Use this reply if an Ubuntu system cannot access a remote samba/windows share.


Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. 

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-client.
SAMBA AS A SERVER
Use this reply if remote clients cannot access a share provided by an Ubuntu system.


Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. 

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-server.
INSTALL/UPGRADE FAILURE
Use this reply if there is a package installation/upgrade failure on the Ubuntu system.


Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. 

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-pkg-fail.

Non-bugs(没有bug?)

Install/upgrade failure due to missing /etc/samba/smb.conf file
HOW TO RECOGNIZE IT
This is a case of install/upgrade failure that results in the following error message (potentially translated):

package samba-common <version> failed to install/upgrade: subprocess post-installation script returned error exit status 1
The DpkgTerminalLog.gz (or /var/log/apt/term.log) contains the following message:

Not replacing deleted config file /etc/samba/smb.conf
chmod: cannot access `/etc/samba/smb.conf': No such file or directory
The user should not be able to provide any /etc/samba/smb.conf file, since it is missing.

STOCK ANSWER

Thank you for taking the time to report this bug and helping to make Ubuntu better.

It looks like you manually removed /etc/samba/smb.conf before reinstalling/upgrading samba packages. Configuration files are special files that should be purged by running "apt-get purge", not manually removed.

You can recover from this situation by restoring /etc/samba/smb.conf and restart pending package configuration:
$ sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf
$ sudo dpkg --configure -a

Alternatively, you can purge samba-common completely and attempt the install/upgrade again:
$ sudo apt-get purge samba-common

This bug will be marked as Invalid: please reopen it if the above steps do not resolve the situation for you. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!
Close the bug report as Invalid.

报错日志

log.commu-pc:[2020/03/04 15:14:02.169275,  0] ../source3/auth/auth_domain.c:226(domain_client_validate)
log.commu-pc:  domain_client_validate: unable to validate password for user xxx in domain xxx to Domain controller AD-03.XXXX.COM. Error was NT_STATUS_ACCESS_DENIED.
log.commu-pc:[2020/03/04 15:14:09.504618,  0] ../source3/auth/auth_domain.c:226(domain_client_validate)
log.commu-pc:  domain_client_validate: unable to validate password for user xxx in domain xxx to Domain controller AD-03.XXXX.COM. Error was NT_STATUS_ACCESS_DENIED.
log.commu-pc:[2020/03/04 15:14:10.669048,  0] ../source3/auth/auth_domain.c:226(domain_client_validate)
log.commu-pc:  domain_client_validate: unable to validate password for user xxx in domain xxx to Domain controller AD-03.XXXX.COM. Error was NT_STATUS_ACCESS_DENIED.

通过日志分析发现 都是 说 某个 user 在 domain controller ad-03 里面 验证密码时候出错。报这个错误的时候也就是不能方法共享目录的时候。
不过这个错误 有时候出现,有时候就能访问共享。

确定samba的版本

 samba -V
Version 4.7.6-Ubuntu

取得samba的源码的版本号

buildfarm@fs-release:/var/log/samba$  dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
libsmbclient 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
libwbclient0 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
python-samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.11  install ok installed
samba-common 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-common-bin 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-dsdb-modules 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-libs 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed
samba-vfs-modules 2:4.7.6+dfsg~ubuntu-0ubuntu2.11 samba install ok installed






下载源代码

克隆ubuntu上面的samba软件源代码。
$ git clone	https://git.launchpad.net/ubuntu/+source/samba (fetch)

检出对应的tag的代码。这个tag就是通过上面的dpkg-query命令查出来的。
$ git for-each-ref |grep '4.7.6.*2.11'
5b83ed324fba2d49685a5527838ff1bfc8c387bd tag	refs/tags/import/2%4.7.6+dfsg_ubuntu-0ubuntu2.11

找到对应的报错日志行的代码 source3/auth/auth_domain.c

错误定位到domain_client_validate 这个方法里面
	if (!NT_STATUS_IS_OK(nt_status)) {
		DEBUG(0,("domain_client_validate: unable to validate password "
                         "for user %s in domain %s to Domain controller %s. "
                         "Error was %s.\n", user_info->client.account_name,
                         user_info->client.domain_name, dc_name,
                         nt_errstr(nt_status)));
我们返现 ad-03 是 来自 dc_name 这个变量,下面我们分析这个dc_name 是怎么来的,dc 估计就是 domain controller的缩写吧。


domain_client_validate 方法是在  check_trustdomain_security 中被调用了。
	fstring dc_name;
	nt_status = domain_client_validate(mem_ctx,
					   user_info,
					   user_info->mapped.domain_name,
					   (uchar *)auth_context->challenge.data,
					   server_info,
					   dc_name,
					   &dc_ss);
其中的 dc_name 就是由 		get_dc_name 方法获得。dc_name 变量在方法开始 定义的。
		if ( !get_dc_name(user_info->mapped.domain_name, NULL, dc_name, &dc_ss) ) {
		DEBUG(5,("check_trustdomain_security: unable to locate a DC for domain %s\n",
			user_info->mapped.domain_name));
		return NT_STATUS_NO_LOGON_SERVERS;
	}
		   

分析 get_dc_name 方法 source3/libsmb/namequery_dc.c

bool get_dc_name(const char *domain,		const char *realm,		fstring srv_name,		struct sockaddr_storage *ss_out)
{
	struct sockaddr_storage dc_ss;
	bool ret;
	bool our_domain = False;

	zero_sockaddr(&dc_ss);

	ret = False;

	if ( strequal(lp_workgroup(), domain) || strequal(lp_realm(), realm) )
		our_domain = True;

	/* always try to obey what the admin specified in smb.conf
	   (for the local domain) */

	if ( (our_domain && lp_security()==SEC_ADS) || realm ) {
		ret = ads_dc_name(domain, realm, &dc_ss, srv_name); // 走到这里调用了
	}

	if (!domain) {
		/* if we have only the realm we can't do anything else */
		return False;
	}

	if (!ret) {
		/* fall back on rpc methods if the ADS methods fail */
		ret = rpc_dc_name(domain, srv_name, &dc_ss);
	}

	*ss_out = dc_ss;

	return ret;
}

其中该方法的第1个参数 domain=xxxxx 。是通过下面的 log 打印推测出来的。

再附加一段搜 dc-name的日志。

./log.old:8332:[2020/03/09 14:49:11.416584,  4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log.old:8333:  ads_dc_name: domain=xxxxx
./log.old:8422:[2020/03/09 14:49:11.477957,  4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log.old:8423:  ads_dc_name: using server='DC01.xxxxx.COM' IP=192.168.151
grep: ./cores: Permission denied
./log:6136:[2020/03/09 15:26:59.059731,  4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log:6137:  ads_dc_name: domain=xxxxx
./log:6234:[2020/03/09 15:26:59.226280,  4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log:6235:  ads_dc_name: using server='NJDC.xxxxx.COM' IP=192.168.152
buildfarm@fs-release:/var/log/samba$ grep dc_name -rni .
./log.old:8332:[2020/03/09 14:49:11.416584,  4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log.old:8333:  ads_dc_name: domain=xxxxx
./log.old:8422:[2020/03/09 14:49:11.477957,  4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log.old:8423:  ads_dc_name: using server='DC01.xxxxx.COM' IP=192.168.151
grep: ./cores: Permission denied
./log:6136:[2020/03/09 15:26:59.059731,  4] ../source3/libsmb/namequery_dc.c:77(ads_dc_name)
./log:6137:  ads_dc_name: domain=xxxxx
./log:6234:[2020/03/09 15:26:59.226280,  4] ../source3/libsmb/namequery_dc.c:151(ads_dc_name)
./log:6235:  ads_dc_name: using server='NJDC.xxxxx.COM' IP=192.168.152


通过上面新增的日志我们看ads_dc_name方法。source3/libsmb/namequery_dc.c


/**********************************************************************
 Is this our primary domain ?
**********************************************************************/

#ifdef HAVE_KRB5
static bool is_our_primary_domain(const char *domain)
{
	int role = lp_server_role();

	if ((role == ROLE_DOMAIN_MEMBER) && strequal(lp_workgroup(), domain)) {
		return True;
	} else if (strequal(get_global_sam_name(), domain)) {
		return True;
	}
	return False;
}
#endif

通过上面新增的日志我们看ads_dc_name方法。source3/libsmb/namequery_dc.c

/**************************************************************************
 Find the name and IP address for a server in the realm/domain
 *************************************************************************/
其中该方法的第1个参数 domain=xxxxx 。是通过上面的 log 打印推测出来的。
static bool ads_dc_name(const char *domain,			const char *realm,			struct sockaddr_storage *dc_ss,			fstring srv_name)
{
	ADS_STRUCT *ads;
	char *sitename;
	int i;
	char addr[INET6_ADDRSTRLEN];

	if (!realm && strequal(domain, lp_workgroup())) {
		realm = lp_realm();
	}

	sitename = sitename_fetch(talloc_tos(), realm);

	/* Try this 3 times then give up. */
	for( i =0 ; i < 3; i++) {
		ads = ads_init(realm, domain, NULL);
		if (!ads) {
			TALLOC_FREE(sitename);
			return False;
		}

		DEBUG(4,("ads_dc_name: domain=%s\n", domain));

#ifdef HAVE_ADS
		/* we don't need to bind, just connect */
		ads->auth.flags |= ADS_AUTH_NO_BIND;
		ads_connect(ads);
#endif

		if (!ads->config.realm) {
			TALLOC_FREE(sitename);
			ads_destroy(&ads);
			return False;
		}

		/* Now we've found a server, see if our sitename
		   has changed. If so, we need to re-do the DNS query
		   to ensure we only find servers in our site. */

		if (stored_sitename_changed(realm, sitename)) {
			TALLOC_FREE(sitename);
			sitename = sitename_fetch(talloc_tos(), realm);
			ads_destroy(&ads);
			/* Ensure we don't cache the DC we just connected to. */
			namecache_delete(realm, 0x1C);
			namecache_delete(domain, 0x1C);
			continue;
		}

#ifdef HAVE_ADS
		if (is_our_primary_domain(domain) && (ads->config.flags & NBT_SERVER_KDC)) {
			if (ads_closest_dc(ads)) {
				/* We're going to use this KDC for this realm/domain.
				   If we are using sites, then force the krb5 libs
				   to use this KDC. */

				create_local_private_krb5_conf_for_domain(realm,
									domain,
									sitename,
									&ads->ldap.ss);
			} else {
				create_local_private_krb5_conf_for_domain(realm,
									domain,
									NULL,
									&ads->ldap.ss);
			}
		}
#endif
		break;
	}

	if (i == 3) {
		DEBUG(1,("ads_dc_name: sitename (now \"%s\") keeps changing ???\n",
			sitename ? sitename : ""));
		TALLOC_FREE(sitename);
		ads_destroy(&ads);
		return False;
	}

	TALLOC_FREE(sitename);

	fstrcpy(srv_name, ads->config.ldap_server_name); // srv_name 这里从 ads->config.ldap_server_name 复制过去的一个字符串。
	if (!strupper_m(srv_name)) {
		ads_destroy(&ads);
		return false;
	}
#ifdef HAVE_ADS
	*dc_ss = ads->ldap.ss;
#else
	zero_sockaddr(dc_ss);
#endif
	ads_destroy(&ads);

	print_sockaddr(addr, sizeof(addr), dc_ss);
	DEBUG(4,("ads_dc_name: using server='%s' IP=%s\n",
		 srv_name, addr));

	return True;
}
/****************************************************************************
 Utility function to return the name of a DC. The name is guaranteed to be
 valid since we have already done a name_status_find on it
 ***************************************************************************/

static bool rpc_dc_name(const char *domain,
			fstring srv_name,
			struct sockaddr_storage *ss_out)
{
	struct ip_service *ip_list = NULL;
	struct sockaddr_storage dc_ss;
	int count, i;
	NTSTATUS result;
	char addr[INET6_ADDRSTRLEN];

	/* get a list of all domain controllers */

	if (!NT_STATUS_IS_OK(get_sorted_dc_list(domain, NULL, &ip_list, &count,
						False))) {
		DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
		return False;
	}

	/* Remove the entry we've already failed with (should be the PDC). */

	for (i = 0; i < count; i++) {
		if (is_zero_addr(&ip_list[i].ss))
			continue;

		if (name_status_find(domain, 0x1c, 0x20, &ip_list[i].ss, srv_name)) {
			result = check_negative_conn_cache( domain, srv_name );
			if ( NT_STATUS_IS_OK(result) ) {
				dc_ss = ip_list[i].ss;
				goto done;
			}
		}
	}

	SAFE_FREE(ip_list);

	/* No-one to talk to )-: */
	return False;		/* Boo-hoo */

 done:
	/* We have the netbios name and IP address of a domain controller.
	   Ideally we should sent a SAMLOGON request to determine whether
	   the DC is alive and kicking.  If we can catch a dead DC before
	   performing a cli_connect() we can avoid a 30-second timeout. */

	print_sockaddr(addr, sizeof(addr), &dc_ss);
	DEBUG(3, ("rpc_dc_name: Returning DC %s (%s) for domain %s\n", srv_name,
		  addr, domain));

	*ss_out = dc_ss;
	SAFE_FREE(ip_list);

	return True;
}


发现debug level 还可以大于11呢。于是直接调到了20.输出如下日志。ADS_STATUS ads_connect(ADS_STRUCT *ads) 方法中的一个调试输出。

	if (DEBUGLEVEL >= 11) {
		char *s = NDR_PRINT_STRUCT_STRING(talloc_tos(), ads_struct, ads);
		DEBUG(11,("ads_connect: entering\n"));
		DEBUGADD(11,("%s\n", s));
		TALLOC_FREE(s);
	}
	通过代码发现 是 直接 dump出来了整个 ads_struct 结构体。
log.old:  ads_connect: entering
log.old-      ads: struct ads_struct
log.old-          is_mine                  : true
log.old-          ads: struct server
log.old-              realm                    : 'xxxx.COM'
log.old-              workgroup                : 'xxxxxx'
log.old-              ldap_server              : NULL
log.old-          ads: struct auth
log.old-              realm                    : NULL
log.old-              password                 : '(PASSWORD omitted)'
log.old-              user_name                : NULL
log.old-              kdc_server               : NULL
log.old-              flags                    : 0x00000022 (34)
log.old-                     0: ADS_AUTH_DISABLE_KERBEROS
log.old-                     1: ADS_AUTH_NO_BIND         
log.old-                     0: ADS_AUTH_ANON_BIND       
log.old-                     0: ADS_AUTH_SIMPLE_BIND     
log.old-                     0: ADS_AUTH_ALLOW_NTLMSSP   
log.old-                     1: ADS_AUTH_SASL_SIGN       
log.old-                     0: ADS_AUTH_SASL_SEAL       
log.old-                     0: ADS_AUTH_SASL_FORCE      
log.old-                     0: ADS_AUTH_USER_CREDS      
log.old-              time_offset              : 0x00000000 (0)
log.old-              tgt_expire               : (time_t)0
log.old-              tgs_expire               : (time_t)0
log.old-              renewable                : (time_t)0
log.old-          ads: struct config
log.old-              flags                    : 0x00000000 (0)
log.old-                     0: DS_SERVER_PDC            
log.old-                     0: DS_SERVER_GC             
log.old-                     0: DS_SERVER_LDAP           
log.old-                     0: DS_SERVER_DS             
log.old-                     0: DS_SERVER_KDC            
log.old-                     0: DS_SERVER_TIMESERV       
log.old-                     0: DS_SERVER_CLOSEST        
log.old-                     0: DS_SERVER_WRITABLE       
log.old-                     0: DS_SERVER_GOOD_TIMESERV  
log.old-                     0: DS_SERVER_NDNC           
log.old-                     0: DS_SERVER_SELECT_SECRET_DOMAIN_6
log.old-                     0: DS_SERVER_FULL_SECRET_DOMAIN_6
log.old-                     0: DS_SERVER_WEBSERV        
log.old-                     0: DS_SERVER_DS_8           
log.old-                     0: DS_DNS_CONTROLLER        
log.old-                     0: DS_DNS_DOMAIN            
log.old-                     0: DS_DNS_FOREST_ROOT       
log.old-              realm                    : NULL
log.old-              bind_path                : NULL
log.old-              ldap_server_name         : NULL
log.old-              server_site_name         : NULL
log.old-              client_site_name         : NULL
log.old-              current_time             : (time_t)0
log.old-              schema_path              : NULL
log.old-              config_path              : NULL
log.old-          ads: struct ldap
log.old-              ld                       : NULL
log.old-              ss                       : 
log.old-              last_attempt             : Tue Jan  6 07:57:53 AM 1970 CST
log.old-              port                     : 0x00000000 (0)
log.old-              saslwrap: struct saslwrap
log.old-                  wrap_type                : 0x0001 (1)
log.old-                  sbiod                    : NULL
log.old-                  mem_ctx                  : NULL
log.old-                  wrap_ops                 : NULL
log.old-                  wrap_private_data        : NULL
log.old-                  saslwrap: struct in
log.old-                      ofs                      : 0x00000000 (0)
log.old-                      needed                   : 0x00000000 (0)
log.old-                      left                     : 0x00000000 (0)
log.old-                      max_wrapped              : 0x00000000 (0)
log.old-                      min_wrapped              : 0x00000000 (0)
log.old-                      size                     : 0x00000000 (0)
log.old-                      buf: ARRAY(0) : NULL
log.old-                  saslwrap: struct out
log.old-                      ofs                      : 0x00000000 (0)
log.old-                      left                     : 0x00000000 (0)
log.old-                      max_unwrapped            : 0x00000000 (0)
log.old-                      sig_size                 : 0x00000000 (0)
log.old-                      size                     : 0x00000000 (0)
log.old-                      buf: ARRAY(0) : NULL
log.old-  


再次分析到 resolve_and_ping_dns方法中

static NTSTATUS resolve_and_ping_dns(ADS_STRUCT *ads, const char *sitename,	 const char *realm)
				     
buildfarm@fs-release:/var/log/samba$ grep resolve_and_ping_dns log*
log.old:[2020/03/09 17:33:45.894215,  6, pid=8229, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old:  resolve_and_ping_dns: (cldap) looking for realm 'xxx.COM'
log.old:[2020/03/09 17:33:46.611538,  6, pid=8230, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old:  resolve_and_ping_dns: (cldap) looking for realm 'xxxx.COM'
log.old:[2020/03/09 17:33:47.319183,  6, pid=8231, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old:  resolve_and_ping_dns: (cldap) looking for realm 'xxxxxxxx.COM'
log.old:[2020/03/09 17:33:48.092824,  6, pid=8233, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old:  resolve_and_ping_dns: (cldap) looking for realm 'xxxx.COM'
log.old:[2020/03/09 17:33:48.814634,  6, pid=8235, effective(0, 0), real(0, 0)] ../source3/libads/ldap.c:419(resolve_and_ping_dns)
log.old:  resolve_and_ping_dns: (cldap) looking for realm 'xxx.COM'

再次分析,得到 get_sorted_dc_list 方法


/*********************************************************************
 Small wrapper function to get the DC list and sort it if neccessary.
*********************************************************************/

NTSTATUS get_sorted_dc_list( const char *domain,
			const char *sitename,
			struct ip_service **ip_list,
			int *count,
			bool ads_only )
			
buildfarm@fs-release:/var/log/samba$ grep get_sorted_dc_list log*
log:[2020/03/09 17:41:53.921164,  8, pid=8313, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log:  get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:49.792818,  8, pid=8308, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old:  get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:50.510170,  8, pid=8309, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old:  get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:51.499312,  8, pid=8310, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old:  get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:52.207439,  8, pid=8311, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old:  get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)
log.old:[2020/03/09 17:41:52.914030,  8, pid=8312, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3355(get_sorted_dc_list)
log.old:  get_sorted_dc_list: attempting lookup for name xxx.COM (sitename Default-First-Site-Name)


下面走到get_dc_list 方法。

/********************************************************
 Get the IP address list of the domain controllers for
 a domain.
*********************************************************/

static NTSTATUS get_dc_list(const char *domain,
			const char *sitename,
			struct ip_service **ip_list,
			int *count,
			enum dc_lookup_type lookup_type,
			bool *ordered)
buildfarm@fs-release:/var/log/samba$ grep get_dc_list log*
log:[2020/03/09 17:43:16.029160,  3, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.029280,  8, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.030213,  4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.030235,  4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log:[2020/03/09 17:43:16.063366,  3, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.065864,  8, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.066247,  4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.066276,  4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88 
log:[2020/03/09 17:43:16.066381,  3, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.068330,  8, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.068704,  4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.068732,  4, pid=8328, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.13.251:88 192.168.31.251:88 
log:[2020/03/09 17:43:16.700775,  3, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.700859,  8, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.701415,  4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.701430,  4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log:[2020/03/09 17:43:16.733917,  3, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.736368,  8, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.736750,  4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.736779,  4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88 
log:[2020/03/09 17:43:16.736901,  3, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:16.739348,  8, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:16.739741,  4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:16.739770,  4, pid=8329, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.13.251:88 192.168.31.251:88 192.168.13.252:88 
log:[2020/03/09 17:43:17.368729,  3, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:17.368867,  8, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:17.369858,  4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:17.369881,  4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log:[2020/03/09 17:43:17.402505,  3, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:17.406303,  8, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:17.406739,  4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:17.406769,  4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88 
log:[2020/03/09 17:43:17.406876,  3, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:17.410338,  8, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:17.410751,  4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:17.410780,  4, pid=8330, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88 
log:[2020/03/09 17:43:37.768653,  3, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:37.768814,  8, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:37.769616,  4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:37.769634,  4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log:[2020/03/09 17:43:37.802598,  3, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:37.804922,  8, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:37.805329,  4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:37.805358,  4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.251:88 192.168.13.252:88 
log:[2020/03/09 17:43:37.805464,  3, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log:[2020/03/09 17:43:37.807314,  8, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log:[2020/03/09 17:43:37.807684,  4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log:  get_dc_list: returning 4 ip addresses in an ordered list
log:[2020/03/09 17:43:37.807712,  4, pid=8334, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log:  get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88 
log.old:[2020/03/09 17:43:05.751178,  3, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:05.751318,  8, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:05.752314,  4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:05.752332,  4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log.old:[2020/03/09 17:43:05.786412,  3, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:05.791044,  8, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:05.791442,  4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:05.791471,  4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88 
log.old:[2020/03/09 17:43:05.791576,  3, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:05.794197,  8, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:05.794579,  4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:05.794608,  4, pid=8324, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.13.251:88 192.168.31.251:88 192.168.13.252:88 
log.old:[2020/03/09 17:43:13.692054,  3, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:13.692174,  8, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:13.693051,  4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:13.693073,  4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log.old:[2020/03/09 17:43:13.725263,  3, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:13.727528,  8, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:13.727913,  4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:13.727942,  4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.31.251:88 192.168.13.251:88 
log.old:[2020/03/09 17:43:13.728049,  3, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:13.729936,  8, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:13.730305,  4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:13.730334,  4, pid=8325, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88 
log.old:[2020/03/09 17:43:14.659077,  3, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:14.659178,  8, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:14.660000,  4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:14.660018,  4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log.old:[2020/03/09 17:43:14.692762,  3, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:14.695040,  8, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:14.695438,  4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:14.695467,  4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.251:88 192.168.13.252:88 
log.old:[2020/03/09 17:43:14.695573,  3, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:14.703135,  8, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:14.703515,  4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:14.703544,  4, pid=8326, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.31.251:88 192.168.13.252:88 192.168.13.251:88 
log.old:[2020/03/09 17:43:15.350163,  3, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:15.350251,  8, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:15.350999,  4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:15.351014,  4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:389 192.168.13.251:389 192.168.31.251:389 192.168.13.252:389 
log.old:[2020/03/09 17:43:15.383322,  3, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:15.385822,  8, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:15.386205,  4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:15.386234,  4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.13.251:88 192.168.13.252:88 192.168.31.251:88 
log.old:[2020/03/09 17:43:15.386341,  3, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3160(get_dc_list)
log.old:  get_dc_list: preferred server list: "AD-SZ.example.com, *"
log.old:[2020/03/09 17:43:15.391064,  8, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3182(get_dc_list)
log.old:[2020/03/09 17:43:15.391461,  4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3305(get_dc_list)
log.old:  get_dc_list: returning 4 ip addresses in an ordered list
log.old:[2020/03/09 17:43:15.391490,  4, pid=8327, effective(0, 0), real(0, 0)] ../source3/libsmb/namequery.c:3306(get_dc_list)
log.old:  get_dc_list: 192.168.17.228:88 192.168.13.252:88 192.168.13.251:88 192.168.31.251:88 



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章