diff options
author | Gordon Ross <gwr@racktopsystems.com> | 2022-08-24 11:26:55 -0400 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-09-28 09:34:01 +0300 |
commit | b78b1474704201201beac8045bbedb34d2361aae (patch) | |
tree | 72056c96621d67333d6199398a77dc166afe0aa2 /usr | |
parent | 430c9d1e782015aefcb7cc52c7bc34674735c9c8 (diff) | |
download | illumos-gate-b78b1474704201201beac8045bbedb34d2361aae.tar.gz |
14998 smbd domain cache broken
Reviewed by: Matt Barden <mbarden@tintri.com>
Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/lib/smbsrv/libsmb/common/smb_domain.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/src/lib/smbsrv/libsmb/common/smb_domain.c b/usr/src/lib/smbsrv/libsmb/common/smb_domain.c index d920fccb01..5b4a15a08f 100644 --- a/usr/src/lib/smbsrv/libsmb/common/smb_domain.c +++ b/usr/src/lib/smbsrv/libsmb/common/smb_domain.c @@ -23,6 +23,7 @@ * Use is subject to license terms. * * Copyright 2017 Nexenta Systems, Inc. All rights reserved. + * Copyright 2022 RackTop Systems, Inc. */ /* @@ -397,10 +398,14 @@ smb_domain_update(smb_domainex_t *dxi) } } + dxi->d_primary.di_type = SMB_DOMAIN_PRIMARY; if (smb_dcache_add(&dxi->d_primary) == SMB_DOMAIN_SUCCESS) { - for (i = 0; i < dxi->d_trusted.td_num; i++) - (void) smb_dcache_add(&dxi->d_trusted.td_domains[i]); - + for (i = 0, dcnode = dxi->d_trusted.td_domains; + i < dxi->d_trusted.td_num; + i++, dcnode++) { + dcnode->di_type = SMB_DOMAIN_TRUSTED; + (void) smb_dcache_add(dcnode); + } smb_dcache_setdc(&dxi->d_dci); } @@ -748,6 +753,8 @@ smb_dcache_add(smb_domain_t *di) { smb_domain_t *dcnode; + assert(di->di_type != 0); + if ((dcnode = malloc(sizeof (smb_domain_t))) == NULL) return (SMB_DOMAIN_NO_MEMORY); |