smbrdr_logon.c revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * SMB session logon and logoff functions. See CIFS section 4.1.
#include <smbrdr_ipc_util.h>
#include <smbrdr.h>
#define SMBRDR_PWD_NULL 0
int pwd_type);
char **username)
int rc = 0;
return (rc);
SMBRDR_PWD_NULL) < 0) {
return (rc);
if (auth) {
if (session) {
char *password)
int erc;
int erc;
if (*username == 0) {
if (!smbrdr_ipc_is_fallback())
&dummy);
if (session == 0) {
if (logon == 0) {
username);
char *native_os;
char *native_lanman;
unsigned short data_bytes;
unsigned short guest;
unsigned long capabilities;
unsigned short null_size;
int rc;
null_size = sizeof (char);
session, 0, 0);
if (rc <= 0) {
if (rc > 0) {
if (rc <= 0) {
if (guest)
int rc;
if (rc < 0) {
return (rc);
rc = 0;
return (rc);
static struct sdb_logon *
int smbrdr_lmcomplvl;
int rc;
if (logon == 0)
switch (pwd_type) {
case SMBRDR_PWD_USER:
if (rc != 0) {
case SMBRDR_PWD_HASH:
if (rc != 0) {
case SMBRDR_PWD_NULL:
return (logon);
static boolean_t
if (session) {
return (valid);