From a6d101109bfb442cf0db6d8ebb5fb7c32cb16d7e Mon Sep 17 00:00:00 2001 From: Gordon Ross Date: Sun, 8 Apr 2018 10:09:12 -0400 Subject: 9472 Add smbutil discon command Reviewed by: Matt Barden Reviewed by: Evan Layton Reviewed by: Andy Fiddaman Reviewed by: Ken Mays Approved by: Dan McDonald --- usr/src/lib/libsmbfs/smb/findvc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr/src/lib/libsmbfs/smb/findvc.c') diff --git a/usr/src/lib/libsmbfs/smb/findvc.c b/usr/src/lib/libsmbfs/smb/findvc.c index cfe2cad9e7..63c6cce242 100644 --- a/usr/src/lib/libsmbfs/smb/findvc.c +++ b/usr/src/lib/libsmbfs/smb/findvc.c @@ -96,6 +96,11 @@ smb_ctx_findvc(struct smb_ctx *ctx) if ((ctx->ct_flags & SMBCF_RESOLVED) == 0) return (EINVAL); + if (ctx->ct_dev_fd < 0) { + if ((err = smb_ctx_gethandle(ctx))) + return (err); + } + for (ai = ctx->ct_addrinfo; ai; ai = ai->ai_next) { switch (ai->ai_family) { -- cgit v1.2.3