mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
windows-smb-fix-20050322
the use logon cache hack only works on xp and above. do not give up use of smb auth simply because it fails fix the smb_vc_t refCount fix to smb_CopyPacket. Only hold a smb_vc_t if there is one.
This commit is contained in:
parent
8d8fe49478
commit
46f7713f16
@ -1841,7 +1841,8 @@ smb_packet_t *smb_CopyPacket(smb_packet_t *pkt)
|
|||||||
tbp = GetPacket();
|
tbp = GetPacket();
|
||||||
memcpy(tbp, pkt, sizeof(smb_packet_t));
|
memcpy(tbp, pkt, sizeof(smb_packet_t));
|
||||||
tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data);
|
tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data);
|
||||||
smb_HoldVC(tbp->vcp);
|
if (tbp->vcp)
|
||||||
|
smb_HoldVC(tbp->vcp);
|
||||||
return tbp;
|
return tbp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8090,18 +8091,23 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
|
|||||||
smb_lsaLogonOrigin.MaximumLength = smb_lsaLogonOrigin.Length + 1;
|
smb_lsaLogonOrigin.MaximumLength = smb_lsaLogonOrigin.Length + 1;
|
||||||
} else {
|
} else {
|
||||||
afsi_log("Can't determine security package name for NTLM!! NTSTATUS=[%l]",nts);
|
afsi_log("Can't determine security package name for NTLM!! NTSTATUS=[%l]",nts);
|
||||||
|
|
||||||
|
/* something went wrong. We report the error and revert back to no authentication
|
||||||
|
because we can't perform any auth requests without a successful lsa handle
|
||||||
|
or sec package id. */
|
||||||
|
afsi_log("Reverting to NO SMB AUTH");
|
||||||
|
smb_authType = SMB_AUTH_NONE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
afsi_log("Can't register logon process!! NTSTATUS=[%l]",nts);
|
afsi_log("Can't register logon process!! NTSTATUS=[%l]",nts);
|
||||||
}
|
|
||||||
|
|
||||||
if (nts != STATUS_SUCCESS) {
|
|
||||||
/* something went wrong. We report the error and revert back to no authentication
|
/* something went wrong. We report the error and revert back to no authentication
|
||||||
because we can't perform any auth requests without a successful lsa handle
|
because we can't perform any auth requests without a successful lsa handle
|
||||||
or sec package id. */
|
or sec package id. */
|
||||||
afsi_log("Reverting to NO SMB AUTH");
|
afsi_log("Reverting to NO SMB AUTH");
|
||||||
smb_authType = SMB_AUTH_NONE;
|
smb_authType = SMB_AUTH_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef COMMENT
|
#ifdef COMMENT
|
||||||
/* Don't fallback to SMB_AUTH_NTLM. Apparently, allowing SPNEGO to be used each
|
/* Don't fallback to SMB_AUTH_NTLM. Apparently, allowing SPNEGO to be used each
|
||||||
* time prevents the failure of authentication when logged into Windows with an
|
* time prevents the failure of authentication when logged into Windows with an
|
||||||
|
Loading…
Reference in New Issue
Block a user