public void LoadApps()
        {
            Apps.Clear();
            _pACs = IntPtr.Zero;
            //Full List of Apps
            _AppList = PI_NetworkIsolationEnumAppContainers();
            //List of Apps that have LoopUtil enabled.
            _AppListConfig = PI_NetworkIsolationGetAppContainerConfig();
            foreach (var PI_app in _AppList)
            {
                AppContainer app = new AppContainer(PI_app.appContainerName, PI_app.displayName, PI_app.workingDirectory, PI_app.appContainerSid);

                var app_capabilities = LoopUtil.getCapabilites(PI_app.capabilities);
                if (app_capabilities.Count > 0)
                {
                    //var sid = new SecurityIdentifier(app_capabilities[0], 0);

                    IntPtr arrayValue = IntPtr.Zero;
                    //var b = LoopUtil.ConvertStringSidToSid(app_capabilities[0].Sid, out arrayValue);
                    //string mysid;
                    //var b = LoopUtil.ConvertSidToStringSid(app_capabilities[0].Sid, out mysid);
                }
                app.LoopUtil = CheckLoopback(PI_app.appContainerSid);
                Apps.Add(app);
            }
        }
Exemple #2
0
        public static void Run(string appName)
        {
            var util = new LoopUtil();

            util.LoadApps();

            var hasChanges = util.CreateExcemptions(appName);

            if (hasChanges)
            {
                util.SaveLoopbackState();
            }
        }
 public void EnableLoopback(string appName)
 {
     LoopUtil.Run(appName);
 }
Exemple #4
0
        public static void Run(string appName)
        {
            var util = new LoopUtil();
            util.LoadApps();

            var hasChanges = util.CreateExcemptions(appName);

            if (hasChanges)
            {
                util.SaveLoopbackState();
            }
            util.SaveLoopbackState();
        }