/[AnywhereTS-MSSQL]/trunk/TSAdminTool/frmConfigServices.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/frmConfigServices.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/TSAdminTool/frmConfigServices.cs	2012/07/15 13:35:48	155
+++ trunk/TSAdminTool/frmConfigServices.cs	2012/07/15 13:42:48	156
@@ -1,3 +1,4 @@
+#define DISALLOW_SETTING_OF_TFTP_FOLDER_ACLS // when defined will not allow RDP only acl to be placed on TFTP folder
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -517,6 +518,9 @@
          // Set user rights to TFTP directory, all remote desktop users should be able to write files.
         void SetTFTPrights(string path)
         {
+#if DISALLOW_SETTING_OF_TFTP_FOLDER_ACLS
+            return;
+#else
             // Ask if we are going to add righs to the TFTP root directory
             DialogResult resultRights;
             resultRights = MessageBox.Show(this, "In order for users to use the AnywhereTS control panel, they need rights to write in the TFTP root directory. Do you want AnywhereTS to add these rights now?", "AnywhereTS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
@@ -526,18 +530,14 @@
                 {
                     // Create a new DirectoryInfo object.
                     DirectoryInfo dInfo = new DirectoryInfo(path);
-
                     // Get a DirectorySecurity object that represents the 
                     // current security settings.
                     DirectorySecurity dSecurity = dInfo.GetAccessControl();
-
                     // Add a FileSystemAccessRule to the security settings, to allow write.
                     // No general rights to delete files. These rights are set on the individual files.
                     dSecurity.AddAccessRule(new FileSystemAccessRule(new SecurityIdentifier(WellKnownSidType.BuiltinRemoteDesktopUsersSid, null), FileSystemRights.WriteData, AccessControlType.Allow));
-
                     // Set the new access settings.
                     dInfo.SetAccessControl(dSecurity);
-
                 }
                 catch (Exception ex)
                 {
@@ -550,6 +550,7 @@
                     return;
                 }
             }
+#endif
         }
 
         private void btnDeleteTerminalServer_Click(object sender, EventArgs e)

 

  ViewVC Help
Powered by ViewVC 1.1.22