コード例 #1
0
 internal ConfigurationSet(DirectoryContext context, string configSetName, DirectoryEntryManager directoryEntryMgr)
 {
     this.cachedSecurityLevel = ~ReplicationSecurityLevel.NegotiatePassThrough;
     this.context             = context;
     this.configSetName       = configSetName;
     this.directoryEntryMgr   = directoryEntryMgr;
 }
 internal ConfigurationSet(DirectoryContext context, string configSetName, DirectoryEntryManager directoryEntryMgr)
 {
     this.cachedSecurityLevel = ~ReplicationSecurityLevel.NegotiatePassThrough;
     this.context = context;
     this.configSetName = configSetName;
     this.directoryEntryMgr = directoryEntryMgr;
 }
コード例 #3
0
 internal ConfigurationSet(DirectoryContext context, string configSetName, DirectoryEntryManager directoryEntryMgr)
 {
     this.cachedSecurityLevel = ReplicationSecurityLevel.MutualAuthentication | ReplicationSecurityLevel.Negotiate;
     this.context             = context;
     this.configSetName       = configSetName;
     this.directoryEntryMgr   = directoryEntryMgr;
 }
コード例 #4
0
ファイル: ConfigSet.cs プロジェクト: zadixon/corefx
 public ReplicationSecurityLevel GetSecurityLevel()
 {
     CheckIfDisposed();
     if (_cachedSecurityLevel == (ReplicationSecurityLevel)(-1))
     {
         DirectoryEntry configEntry = _directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
         _cachedSecurityLevel = (ReplicationSecurityLevel)((int)PropertyManager.GetPropertyValue(_context, configEntry, PropertyManager.MsDSReplAuthenticationMode));
     }
     return(_cachedSecurityLevel);
 }
コード例 #5
0
 public ReplicationSecurityLevel GetSecurityLevel()
 {
     this.CheckIfDisposed();
     if (this.cachedSecurityLevel == ~ReplicationSecurityLevel.NegotiatePassThrough)
     {
         DirectoryEntry cachedDirectoryEntry = this.directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
         this.cachedSecurityLevel = (ReplicationSecurityLevel)((int)PropertyManager.GetPropertyValue(this.context, cachedDirectoryEntry, PropertyManager.MsDSReplAuthenticationMode));
     }
     return(this.cachedSecurityLevel);
 }
コード例 #6
0
 public void SetSecurityLevel(ReplicationSecurityLevel securityLevel)
 {
     this.CheckIfDisposed();
     if ((securityLevel < ReplicationSecurityLevel.NegotiatePassThrough) || (securityLevel > ReplicationSecurityLevel.MutualAuthentication))
     {
         throw new InvalidEnumArgumentException("securityLevel", (int)securityLevel, typeof(ReplicationSecurityLevel));
     }
     try
     {
         DirectoryEntry cachedDirectoryEntry = this.directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
         cachedDirectoryEntry.Properties[PropertyManager.MsDSReplAuthenticationMode].Value = (int)securityLevel;
         cachedDirectoryEntry.CommitChanges();
     }
     catch (COMException exception)
     {
         throw ExceptionHelper.GetExceptionFromCOMException(this.context, exception);
     }
     this.cachedSecurityLevel = ~ReplicationSecurityLevel.NegotiatePassThrough;
 }
コード例 #7
0
ファイル: ConfigSet.cs プロジェクト: zadixon/corefx
        public void SetSecurityLevel(ReplicationSecurityLevel securityLevel)
        {
            CheckIfDisposed();
            if (securityLevel < ReplicationSecurityLevel.NegotiatePassThrough || securityLevel > ReplicationSecurityLevel.MutualAuthentication)
            {
                throw new InvalidEnumArgumentException(nameof(securityLevel), (int)securityLevel, typeof(ReplicationSecurityLevel));
            }

            try
            {
                DirectoryEntry configEntry = _directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
                configEntry.Properties[PropertyManager.MsDSReplAuthenticationMode].Value = (int)securityLevel;
                configEntry.CommitChanges();
            }
            catch (COMException e)
            {
                throw ExceptionHelper.GetExceptionFromCOMException(_context, e);
            }

            // invalidate the cached entry
            _cachedSecurityLevel = (ReplicationSecurityLevel)(-1);
        }
 public void SetSecurityLevel(ReplicationSecurityLevel securityLevel)
 {
 }
コード例 #9
0
ファイル: ConfigurationSet.cs プロジェクト: nickchal/pash
		public void SetSecurityLevel(ReplicationSecurityLevel securityLevel)
		{
			this.CheckIfDisposed();
			if (securityLevel < ReplicationSecurityLevel.NegotiatePassThrough || securityLevel > ReplicationSecurityLevel.MutualAuthentication)
			{
				throw new InvalidEnumArgumentException("securityLevel", (int)securityLevel, typeof(ReplicationSecurityLevel));
			}
			else
			{
				try
				{
					DirectoryEntry cachedDirectoryEntry = this.directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
					cachedDirectoryEntry.Properties[PropertyManager.MsDSReplAuthenticationMode].Value = (int)securityLevel;
					cachedDirectoryEntry.CommitChanges();
				}
				catch (COMException cOMException1)
				{
					COMException cOMException = cOMException1;
					throw ExceptionHelper.GetExceptionFromCOMException(this.context, cOMException);
				}
				this.cachedSecurityLevel = ReplicationSecurityLevel.MutualAuthentication | ReplicationSecurityLevel.Negotiate;
				return;
			}
		}
コード例 #10
0
ファイル: ConfigurationSet.cs プロジェクト: nickchal/pash
		public ReplicationSecurityLevel GetSecurityLevel()
		{
			this.CheckIfDisposed();
			if (this.cachedSecurityLevel == (ReplicationSecurityLevel.MutualAuthentication | ReplicationSecurityLevel.Negotiate))
			{
				DirectoryEntry cachedDirectoryEntry = this.directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
				this.cachedSecurityLevel = (ReplicationSecurityLevel)((int)PropertyManager.GetPropertyValue(this.context, cachedDirectoryEntry, PropertyManager.MsDSReplAuthenticationMode));
			}
			return this.cachedSecurityLevel;
		}
コード例 #11
0
ファイル: ConfigurationSet.cs プロジェクト: nickchal/pash
		internal ConfigurationSet(DirectoryContext context, string configSetName, DirectoryEntryManager directoryEntryMgr)
		{
			this.cachedSecurityLevel = ReplicationSecurityLevel.MutualAuthentication | ReplicationSecurityLevel.Negotiate;
			this.context = context;
			this.configSetName = configSetName;
			this.directoryEntryMgr = directoryEntryMgr;
		}
コード例 #12
0
	public void SetSecurityLevel(ReplicationSecurityLevel securityLevel) {}
コード例 #13
0
ファイル: ConfigSet.cs プロジェクト: chcosta/corefx
        public void SetSecurityLevel(ReplicationSecurityLevel securityLevel)
        {
            CheckIfDisposed();
            if (securityLevel < ReplicationSecurityLevel.NegotiatePassThrough || securityLevel > ReplicationSecurityLevel.MutualAuthentication)
            {
                throw new InvalidEnumArgumentException("securityLevel", (int)securityLevel, typeof(ReplicationSecurityLevel));
            }

            try
            {
                DirectoryEntry configEntry = _directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
                configEntry.Properties[PropertyManager.MsDSReplAuthenticationMode].Value = (int)securityLevel;
                configEntry.CommitChanges();
            }
            catch (COMException e)
            {
                throw ExceptionHelper.GetExceptionFromCOMException(_context, e);
            }

            // invalidate the cached entry
            _cachedSecurityLevel = (ReplicationSecurityLevel)(-1);
        }
コード例 #14
0
ファイル: ConfigSet.cs プロジェクト: chcosta/corefx
 public ReplicationSecurityLevel GetSecurityLevel()
 {
     CheckIfDisposed();
     if (_cachedSecurityLevel == (ReplicationSecurityLevel)(-1))
     {
         DirectoryEntry configEntry = _directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.ConfigurationNamingContext);
         _cachedSecurityLevel = (ReplicationSecurityLevel)((int)PropertyManager.GetPropertyValue(_context, configEntry, PropertyManager.MsDSReplAuthenticationMode));
     }
     return _cachedSecurityLevel;
 }