private void SetToken (IntPtr token)
{
if (IsPosix) {
_token = token;
// apply defaults
if (_type == null)
_type = "POSIX";
// override user choice in this specific case
if (_token == IntPtr.Zero)
_account = WindowsAccountType.System;
}
else {
if ((token == invalidWindows) && (_account != WindowsAccountType.Anonymous))
throw new ArgumentException ("Invalid token");
_token = token;
// apply defaults
if (_type == null)
_type = "NTLM";
}
}