,"Incorrect function.","Incorrect function.","The system cannot find the file specified."
,"Bad password.","The system cannot find the path specified.","reserved","The client does not have the necessary access rights to perform the requested function."
,"Access is denied.","The TID specified was invalid.","The handle is invalid."
,"The network name cannot be found.","Not enough storage is available to process this command."
,"The media is write protected.","The device is not ready.","A device attached to the system is not functioning."
,"A device attached to the system is not functioning.","The process cannot access the file because it is being used by another process."
,"The process cannot access the file because it is being used by another process."
,"The process cannot access the file because another process has locked a portion of the file."
,"The disk is full.","A duplicate name exists on the network.","The network name cannot be found."
,"ERRnomoreconn.","The file exists.","The parameter is incorrect.","Too many Uids active on this session."
,"The Uid is not known as a valid user identifier on this session.","The pipe has been ended."
,"The filename, directory name, or volume label syntax is incorrect.","The directory is not empty."
,"Cannot create a file when that file already exists.","All pipe instances are busy."
,"The pipe is being closed.","No process is on the other end of the pipe.","More data is available."
,"This user account has expired.","The user is not allowed to log on from this workstation."
,"The user is not allowed to log on at this time.","The password of this user has expired."
};
}
publicstaticstring[]DosErrorMessages=
{
"The operation completed successfully.",
"Incorrect function.",
"Incorrect function.",
"The system cannot find the file specified.",
"Bad password.",
"The system cannot find the path specified.",
"reserved",
"The client does not have the necessary access rights to perform the requested function.",
"Access is denied.",
"The TID specified was invalid.",
"The handle is invalid.",
"The network name cannot be found.",
"Not enough storage is available to process this command.",
"The media is write protected.",
"The device is not ready.",
"A device attached to the system is not functioning.",
"A device attached to the system is not functioning.",
"The process cannot access the file because it is being used by another process.",
"The process cannot access the file because it is being used by another process.",
"The process cannot access the file because another process has locked a portion of the file.",
"The disk is full.",
"A duplicate name exists on the network.",
"The network name cannot be found.",
"ERRnomoreconn.",
"The file exists.",
"The parameter is incorrect.",
"Too many Uids active on this session.",
"The Uid is not known as a valid user identifier on this session.",
"The pipe has been ended.",
"The filename, directory name, or volume label syntax is incorrect.",
"The directory is not empty.",
"Cannot create a file when that file already exists.",
"All pipe instances are busy.",
"The pipe is being closed.",
"No process is on the other end of the pipe.",
"More data is available.",
"This user account has expired.",
"The user is not allowed to log on from this workstation.",
"The user is not allowed to log on at this time.",
,"A device attached to the system is not functioning.","Incorrect function.",
"The parameter is incorrect.","Invalid access to memory location.","The handle is invalid."
,"The parameter is incorrect.","The system cannot find the file specified.","The system cannot find the file specified."
,"More data is available.","Access is denied.","The data area passed to a system call is too small."
,"The filename, directory name, or volume label syntax is incorrect.","The system cannot find the file specified."
,"Cannot create a file when that file already exists.","The handle is invalid."
,"The specified path is invalid.","The system cannot find the path specified."
,"The specified path is invalid.","The process cannot access the file because it is being used by another process."
,"Access is denied.","There are currently no logon servers available to service the logon request."
,"The specified user already exists.","The specified user does not exist.","The specified network password is not correct."
,"Logon failure: unknown user name or bad password.","Logon failure: user account restriction."
,"Logon failure: account logon time restriction violation.","Logon failure: user not allowed to log on to this computer."
,"Logon failure: the specified account password has expired.","Logon failure: account currently disabled."
,"No mapping between account names and security IDs was done.","The security ID structure is invalid."
,"All pipe instances are busy.","All pipe instances are busy.","The pipe state is invalid."
,"All pipe instances are busy.","No process is on the other end of the pipe.",
"The pipe is being closed.","Waiting for a process to open the other end of the pipe."
,"Access is denied.","A duplicate name exists on the network.","The specified network name is no longer available."
,"Network access is denied.","The network name cannot be found.","No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept."
,"Indicates a Windows NT Server could not be contacted or that objects within the domain are protected such that necessary information could not be retrieved."
,"The specified domain did not exist.","The directory name is invalid.","Access is denied."
,"The format of the specified computer name is invalid.","The pipe has been ended."
,"The specified local group does not exist.","Logon failure: the user has not been granted the requested logon type at this computer."
,"The SAM database on the Windows NT Server does not have a computer account for this workstation trust relationship."
,"The trust relationship between the primary domain and the trusted domain failed."
,"The account used is a Computer Account. Use your global user account or local user account to access this server."
,"The user must change his password before he logs on the first time.","NT_STATUS_NOT_FOUND"
,"The referenced account is currently locked out and may not be logged on to.",
"The remote system is not reachable by the transport.","NT_STATUS_IO_REPARSE_TAG_NOT_HANDLED"
};
}
publicstaticint[]NtStatusCodes=
{
NtStatusOk,
NtStatusUnsuccessful,
NtStatusNotImplemented,
NtStatusInvalidInfoClass,
NtStatusAccessViolation,
NtStatusInvalidHandle,
NtStatusInvalidParameter,
NtStatusNoSuchDevice,
NtStatusNoSuchFile,
NtStatusMoreProcessingRequired,
NtStatusAccessDenied,
NtStatusBufferTooSmall,
NtStatusObjectNameInvalid,
NtStatusObjectNameNotFound,
NtStatusObjectNameCollision,
NtStatusPortDisconnected,
NtStatusObjectPathInvalid,
NtStatusObjectPathNotFound,
NtStatusObjectPathSyntaxBad,
NtStatusSharingViolation,
NtStatusDeletePending,
NtStatusNoLogonServers,
NtStatusUserExists,
NtStatusNoSuchUser,
NtStatusWrongPassword,
NtStatusLogonFailure,
NtStatusAccountRestriction,
NtStatusInvalidLogonHours,
NtStatusInvalidWorkstation,
NtStatusPasswordExpired,
NtStatusAccountDisabled,
NtStatusNoneMapped,
NtStatusInvalidSid,
NtStatusInstanceNotAvailable,
NtStatusPipeNotAvailable,
NtStatusInvalidPipeState,
NtStatusPipeBusy,
NtStatusPipeDisconnected,
NtStatusPipeClosing,
NtStatusPipeListening,
NtStatusFileIsADirectory,
NtStatusDuplicateName,
NtStatusNetworkNameDeleted,
NtStatusNetworkAccessDenied,
NtStatusBadNetworkName,
NtStatusRequestNotAccepted,
NtStatusCantAccessDomainInfo,
NtStatusNoSuchDomain,
NtStatusNotADirectory,
NtStatusCannotDelete,
NtStatusInvalidComputerName,
NtStatusPipeBroken,
NtStatusNoSuchAlias,
NtStatusLogonTypeNotGranted,
NtStatusNoTrustSamAccount,
NtStatusTrustedDomainFailure,
NtStatusNologonWorkstationTrustAccount,
NtStatusPasswordMustChange,
NtStatusNotFound,
NtStatusAccountLockedOut,
NtStatusPathNotCovered,
NtStatusIoReparseTagNotHandled
};
publicstaticstring[]NtStatusMessages=
{
"The operation completed successfully.",
"A device attached to the system is not functioning.",
"Incorrect function.",
"The parameter is incorrect.",
"Invalid access to memory location.",
"The handle is invalid.",
"The parameter is incorrect.",
"The system cannot find the file specified.",
"The system cannot find the file specified.",
"More data is available.",
"Access is denied.",
"The data area passed to a system call is too small.",
"The filename, directory name, or volume label syntax is incorrect.",
"The system cannot find the file specified.",
"Cannot create a file when that file already exists.",
"The handle is invalid.",
"The specified path is invalid.",
"The system cannot find the path specified.",
"The specified path is invalid.",
"The process cannot access the file because it is being used by another process.",
"Access is denied.",
"There are currently no logon servers available to service the logon request.",
"The specified user already exists.",
"The specified user does not exist.",
"The specified network password is not correct.",
"Logon failure: unknown user name or bad password.",
"Logon failure: user account restriction.",
"Logon failure: account logon time restriction violation.",
"Logon failure: user not allowed to log on to this computer.",
"Logon failure: the specified account password has expired.",
"Logon failure: account currently disabled.",
"No mapping between account names and security IDs was done.",
"The security ID structure is invalid.",
"All pipe instances are busy.",
"All pipe instances are busy.",
"The pipe state is invalid.",
"All pipe instances are busy.",
"No process is on the other end of the pipe.",
"The pipe is being closed.",
"Waiting for a process to open the other end of the pipe.",
"Access is denied.",
"A duplicate name exists on the network.",
"The specified network name is no longer available.",
"Network access is denied.",
"The network name cannot be found.",
"No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.",
"Indicates a Windows NT Server could not be contacted or that objects within the domain are protected such that necessary information could not be retrieved.",
"The specified domain did not exist.",
"The directory name is invalid.",
"Access is denied.",
"The format of the specified computer name is invalid.",
"The pipe has been ended.",
"The specified local group does not exist.",
"Logon failure: the user has not been granted the requested logon type at this computer.",
"The SAM database on the Windows NT Server does not have a computer account for this workstation trust relationship.",
"The trust relationship between the primary domain and the trusted domain failed.",
"The account used is a Computer Account. Use your global user account or local user account to access this server.",
"The user must change his password before he logs on the first time.",
"NT_STATUS_NOT_FOUND",
"The referenced account is currently locked out and may not be logged on to.",
"The remote system is not reachable by the transport.",
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
namespaceSharpCifs.Smb
{
/// <summary>This class can be extended by applications that wish to trap authentication related exceptions and automatically retry the exceptional operation with different credentials.
/// </summary>
/// <remarks>This class can be extended by applications that wish to trap authentication related exceptions and automatically retry the exceptional operation with different credentials. Read <a href="../../../authhandler.html">jCIFS Exceptions and NtlmAuthenticator</a> for complete details.
/// </remarks>
publicabstractclassNtlmAuthenticator
{
privatestaticNtlmAuthenticator_auth;
/// <summary>
/// This class can be extended by applications that wish to trap authentication related exceptions and automatically retry the exceptional operation with different credentials.
/// </summary>
/// <remarks>
/// This class can be extended by applications that wish to trap authentication related exceptions and automatically retry the exceptional operation with different credentials. Read <a href="../../../authhandler.html">jCIFS Exceptions and NtlmAuthenticator</a> for complete details.
/// </remarks>
publicabstractclassNtlmAuthenticator
{
privatestaticNtlmAuthenticator_auth;
privatestring_url;
privatestring_url;
privateSmbAuthException_sae;
privateSmbAuthException_sae;
privatevoidReset()
{
_url=null;
_sae=null;
}
privatevoidReset()
{
_url=null;
_sae=null;
}
/// <summary>Set the default <tt>NtlmAuthenticator</tt>.</summary>
/// <remarks>Set the default <tt>NtlmAuthenticator</tt>. Once the default authenticator is set it cannot be changed. Calling this metho again will have no effect.
/// </remarks>
publicstaticvoidSetDefault(NtlmAuthenticatora)
{
lock(typeof(NtlmAuthenticator))
{
if(_auth!=null)
{
return;
}
_auth=a;
}
}
/// <summary>Set the default <tt>NtlmAuthenticator</tt>.</summary>
/// <remarks>
/// Set the default <tt>NtlmAuthenticator</tt>. Once the default authenticator is set it cannot be changed. Calling this metho again will have no effect.
/// <summary>An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the <tt>getRequestingURL</tt> and <tt>getRequestingException</tt> methods.
/// </summary>
/// <remarks>
/// An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the <tt>getRequestingURL</tt> and <tt>getRequestingException</tt> methods.
/// If this method returns <tt>null</tt> the <tt>SmbAuthException</tt> that triggered the authenticator check will simply be rethrown. The default implementation returns <tt>null</tt>.
/// <summary>An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the <tt>getRequestingURL</tt> and <tt>getRequestingException</tt> methods.
/// </summary>
/// <remarks>
/// An application extending this class must provide an implementation for this method that returns new user credentials try try when accessing SMB resources described by the <tt>getRequestingURL</tt> and <tt>getRequestingException</tt> methods.
/// If this method returns <tt>null</tt> the <tt>SmbAuthException</tt> that triggered the authenticator check will simply be rethrown. The default implementation returns <tt>null</tt>.
/// <remarks>For initiating NTLM authentication (including NTLMv2). If you want to add NTLMv2 authentication support to something this is what you want to use. See the code for details. Note that JCIFS does not implement the acceptor side of NTLM authentication.
/// <remarks>For initiating NTLM authentication (including NTLMv2). If you want to add NTLMv2 authentication support to something this is what you want to use. See the code for details. Note that JCIFS does not implement the acceptor side of NTLM authentication.