ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * CDDL HEADER START
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * The contents of this file are subject to the terms of the
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Common Development and Distribution License (the "License").
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * You may not use this file except in compliance with the License.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * See the License for the specific language governing permissions
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * and limitations under the License.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * When distributing Covered Code, include this CDDL HEADER in each
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * If applicable, add the following below this CDDL HEADER, with the
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * fields enclosed by brackets "[]" replaced with your own identifying
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * information: Portions Copyright [yyyy] [name of copyright owner]
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * CDDL HEADER END
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
b3700b074e637f8c6991b70754c88a2cfffb246bGordon Ross * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * There used to be a "redirector" library, which has been replaced,
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * leaving only the "glue" functions in this file that adapt this
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * library to the interface provided by libsmbfs.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * mlsvc_disconnect
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Disconnects the session with given server.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * The new conection manager is smart enough
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * so that we don't need this to do anything.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross/* ARGSUSED */
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * smbrdr_logon
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * I'm not sure this really needs to do anything, but for now
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * let's go ahead and authenticate here so this can return a
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * status reflecting the outcome of authentication.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * If this successfully builds an smb_ctx, it just frees it.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * The driver retains sessions for a little while after the
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * last reference goes away, so the session created here will
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * usually still exist when the next call to smbrdr_ctx_new
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * asks for this server+user (immediately after this returns),
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * and only one session setup will go over the wire.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Setup a new SMB client context.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Get the SMB server's configuration stuff and
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * store it in the new client context object.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Rosssmbrdr_ctx_new(struct smb_ctx **ctx_p, char *server,
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Set server, share, domain, user
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * (in the ctx handle).
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Set auth. info (hash) and type.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross (void) smb_config_getnum(SMB_CI_LM_LEVEL, &lmcl);
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross /* Send NTLM */
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross /* Send NTLMv2 */
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Do lookup, connect, session setup, tree connect.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross * Or find and reuse a session/tree, if one exists.
ed9aabc708901eb85fb058aacbd851c0fd958a16Gordon Ross /* Success! */