Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

612 lines
21 KiB

  1. <% '--------------------------------------------------------------------------
  2. ' nfsgroupmap_prop.asp: Used for the Advanced mappping for the NFS groups
  3. '
  4. ' Copyright (c) Microsoft Corporation. All rights reserved.
  5. '
  6. ' Date Description
  7. ' 25-09-2000 Created date
  8. '
  9. ' 03-04-2001 In order to implement an stable program, decide to
  10. ' rewrite the code of nfs mappings
  11. '--------------------------------------------------------------------------
  12. '--------------------------------------------------------------------------
  13. 'Form variables
  14. '--------------------------------------------------------------------------
  15. ' Used by group mappings
  16. Dim F_strMapsToGroup 'To store the mappings of group
  17. Dim F_strSysAccountToGroup 'To store the system group account
  18. Dim F_strNisAccountToGroup 'To store the Nis group account
  19. Dim F_strDomainGroup 'To store the input of domain group mappings
  20. Dim F_strNisGroupName 'Format: groupname:mapvalue
  21. Dim F_strNTSelectedIDToGroup 'To store the selected index of NT group
  22. Dim F_strNISSelectedIDToGroup 'To store the selected index of NIS group
  23. Dim F_strMapsSelectedToGroup 'To store the selected index of maps
  24. 'init hidden form value
  25. F_strNTSelectedIDToGroup = "-1"
  26. F_strNISSelectedIDToGroup = "-1"
  27. F_strMapsSelectedToGroup = "-1"
  28. ' Check whether the service is there or not
  29. if not isServiceStarted("mapsvc") then
  30. SA_ServeFailurePage L_SERVICENOTSTARTED_ERRORMESSAGE
  31. end if
  32. %>
  33. <script language="javascript">
  34. function EXPGROUPMAPInit()
  35. {
  36. document.frmTask.selWinGroups.selectedIndex=
  37. parseInt(document.frmTask.hdnNTSelectedIDToGroup.value,10);
  38. document.frmTask.selUNIXGroups.selectedIndex=
  39. parseInt(document.frmTask.hdnNISSelectedIDToGroup.value,10);
  40. document.frmTask.selMappedGroups.selectedIndex=
  41. parseInt(document.frmTask.hdnMapsSelectedToGroup.value,10);
  42. fnSetGroupButtonStatus();
  43. }
  44. function EXPGROUPMAPSetData()
  45. {
  46. var intIdx;
  47. var strMappingEntry;
  48. var strUnixGroup,arrTemp;
  49. strMappingEntry = "";
  50. strUnixGroup= "";
  51. //going through all the entries in the selected maps
  52. for(intIdx = 1; intIdx < document.frmTask.selMappedGroups.length; intIdx++)
  53. {
  54. if (document.frmTask.selMappedGroups.options[intIdx].value =="")
  55. {
  56. continue;
  57. }
  58. if ( intIdx == document.frmTask.selMappedGroups.length - 1 )
  59. {
  60. strMappingEntry = strMappingEntry + document.frmTask.
  61. selMappedGroups.options[intIdx].value;
  62. }
  63. else
  64. {
  65. strMappingEntry = strMappingEntry + document.frmTask.
  66. selMappedGroups.options[intIdx].value+"#";
  67. }
  68. }
  69. document.frmTask.hdnMapsToGroup.value = strMappingEntry;
  70. document.frmTask.hdnDomainGroup.value = document.frmTask.txtDomainGroup.value;
  71. intIdx = document.frmTask.selUNIXGroups.selectedIndex;
  72. if(intIdx!=-1)
  73. {
  74. strUnixGroup = document.frmTask.selUNIXGroups.options[intIdx].text;
  75. arrTemp=strUnixGroup.split("(");
  76. document.frmTask.hdnNisGroupName.value = arrTemp[0];
  77. }
  78. else
  79. document.frmTask.hdnNisGroupName.value = "";
  80. }
  81. function EXPGROUPMAPValidatePage()
  82. {
  83. return true;
  84. }
  85. function checkForDomainChange()
  86. {
  87. if(document.frmTask.txtNISDomain.value !=
  88. document.frmTask.hdntxtGen_NISDomain.value)
  89. {
  90. document.frmTask.hdnDomainChanged.value='1';
  91. return;
  92. }
  93. document.frmTask.hdnDomainChanged.value='0';
  94. }
  95. function GetUNIXGroups()
  96. {
  97. if(document.frmTask.txtNISDomain != null &&
  98. Trim(document.frmTask.txtNISDomain.value) == "")
  99. {
  100. DisplayErr("<%=Server.HTMLEncode(L_NISDOMAIN_EMPTY_ERRORMESSAGE)%>");
  101. document.frmTask.txtNISDomain.value="";
  102. document.frmTask.txtNISDomain.focus();
  103. return;
  104. }
  105. document.frmTask.Method.value = "GetUNIXGroups";
  106. SetData();
  107. document.frmTask.submit();
  108. }
  109. function fnAddLocalGroupMap()
  110. {
  111. var strWinGroup;
  112. var strMappedGroup;
  113. var arrVal;
  114. var strNISDomain;
  115. var strNISServer;
  116. var intDomainID;
  117. var intIndex
  118. if (document.frmTask.hdnDomainChanged.value=='1')
  119. {
  120. DisplayErr("<%=Server.HTMLEncode(L_INVALIDDOMAIN_ERRORMESSAGE)%>");
  121. document.frmTask.onkeypress = ClearErr;
  122. document.frmTask.onmousedown =ClearErr;
  123. return;
  124. }
  125. strWinGroup = document.frmTask.selWinGroups.options[document.frmTask.selWinGroups.selectedIndex].text;
  126. //Check whether the Windows group name is not unmapped
  127. strWinGroup = document.frmTask.hdnSystemName.value + "\\"+strWinGroup;
  128. intIndex = IsExistsInMappings(strWinGroup,document.frmTask.selMappedGroups)
  129. if(intIndex != -1)
  130. {
  131. if( document.frmTask.selMappedGroups.options[intIndex].value != "")
  132. {
  133. DisplayErr("<%=Server.HTMLEncode(L_WINGROUPALREADYMAPPED_ERRORMESSAGE)%>");
  134. document.frmTask.onkeypress = ClearErr;
  135. document.frmTask.onmousedown = ClearErr;
  136. return
  137. }
  138. else
  139. {
  140. document.frmTask.selMappedGroups.options[intIndex] = null;
  141. }
  142. }
  143. strMappedGroup = packString(strWinGroup,"...",20,true);
  144. arrVal = (document.frmTask.selUNIXGroups.value).split(":");
  145. strNISDomain =document.frmTask.hdntxtGen_NISDomain.value;
  146. strNISServer=document.frmTask.hdntxtGen_NISServer.value;;
  147. if (document.frmTask.hdnintGen_UserGroupMap_radio.value == '1')
  148. intDomainID = "1";
  149. else
  150. {
  151. intDomainID = "0";
  152. strNISDomain = "group file";
  153. }
  154. //get unix group value
  155. var strUnixGroup,arrTemp
  156. arrTemp = document.frmTask.selUNIXGroups.options
  157. [document.frmTask.selUNIXGroups.selectedIndex].text.split("(");
  158. strUnixGroup =arrTemp[0]
  159. strMappedGroup += packString(strNISDomain,"...",13,true)+
  160. packString(strUnixGroup,"...",13,true)+
  161. packString(arrVal[1],"...",4,false)+ packString("","...",4,false);
  162. if(intDomainID == "0" )
  163. {
  164. strNISDomain = "PCNFS";
  165. strNISServer = "PCNFS";
  166. }
  167. if (fnbAdd(document.frmTask.selMappedGroups,strMappedGroup,
  168. "MappedGroup",("^"+":"+strWinGroup+":"+
  169. intDomainID+":"+strNISDomain+":"+strNISServer+":"+
  170. document.frmTask.selUNIXGroups.value)))
  171. document.frmTask.btnSetPrimary.disabled =false;
  172. }
  173. function fnAddDomainGroupMap()
  174. {
  175. var strDomainGroup;
  176. if (document.frmTask.hdnDomainChanged.value=='1')
  177. {
  178. DisplayErr("<%=Server.HTMLEncode(L_INVALIDDOMAIN_ERRORMESSAGE)%>");
  179. document.frmTask.onkeypress = ClearErr;
  180. document.frmTask.onmousedown =ClearErr;
  181. return;
  182. }
  183. strDomainGroup= document.frmTask.txtDomainGroup.value.split("\\");
  184. if(strDomainGroup.length != 2)
  185. {
  186. DisplayErr("<%=Server.HTMLEncode(L_NFS_ERR_DOMAIN_USER_FORMAT)%>");
  187. document.frmTask.txtDomainGroup.select();
  188. document.frmTask.txtDomainGroup.focus();
  189. return;
  190. }
  191. //the next step is to add the map to the list, run at server
  192. document.frmTask.Method.value = "AddDomainGroupMap";
  193. SetData();
  194. document.frmTask.submit();
  195. }
  196. function fnSetGroupPrimary()
  197. {
  198. var strTemp, intIdx,i;
  199. var strValue;
  200. intIdx = document.frmTask.selMappedGroups.selectedIndex;
  201. if (intIdx !=-1)
  202. {
  203. strTemp = document.frmTask.selMappedGroups.
  204. options[document.frmTask.selMappedGroups.selectedIndex].text;
  205. strValue = document.frmTask.selMappedGroups.options[intIdx].value;
  206. if (strValue.charAt(0) == "^")
  207. {
  208. var arrTemp, strGroupName,strTemp1;
  209. var strVal1;
  210. arrTemp = strValue.split(":");
  211. strGroupName = arrTemp[5];
  212. for( i=1; i < document.frmTask.selMappedGroups.length ;i++)
  213. {
  214. strVal1 = document.frmTask.selMappedGroups.options[i].value;
  215. arrTemp1 = strVal1.split(":");
  216. if(arrTemp1.length <3)
  217. continue;
  218. strTemp1 = arrTemp1[5];
  219. if (Trim(strGroupName).toUpperCase() == Trim(strTemp1).toUpperCase())
  220. {
  221. str1 = document.frmTask.selMappedGroups.options[i].text;
  222. if (strVal1.charAt(0) == "*")
  223. {
  224. document.frmTask.selMappedGroups.options[i].text =
  225. str1.substring(0,str1.length-3) + "";
  226. document.frmTask.selMappedGroups.options[i].value =
  227. "^" + strVal1.substring(1,strVal1.length);
  228. }
  229. }
  230. }
  231. document.frmTask.selMappedGroups.options[intIdx].text =
  232. strTemp.substring(0,strTemp.length) + "Yes";
  233. document.frmTask.selMappedGroups.options[intIdx].value =
  234. "*" + strValue.substring(1,strValue.length);
  235. }
  236. else
  237. {
  238. document.frmTask.selMappedGroups.options[intIdx].text =
  239. strTemp.substring(0,strTemp.length-3) + "";
  240. document.frmTask.selMappedGroups.options[intIdx].value =
  241. "^" + strValue.substring(1,strValue.length);
  242. }
  243. document.frmTask.selMappedGroups.selectedIndex = intIdx;
  244. }
  245. }
  246. function fnSetGroupButtonStatus()
  247. {
  248. if(document.frmTask.selWinGroups.selectedIndex== -1 ||
  249. document.frmTask.selWinGroups.options
  250. [document.frmTask.selWinGroups.selectedIndex].value==""||
  251. document.frmTask.selUNIXGroups.selectedIndex==-1 ||
  252. document.frmTask.selUNIXGroups.options
  253. [document.frmTask.selUNIXGroups.selectedIndex].value=="")
  254. {
  255. document.frmTask.btnAddLocalGroupMap.disabled=true;
  256. }
  257. else
  258. {
  259. document.frmTask.btnAddLocalGroupMap.disabled=false;
  260. }
  261. if(document.frmTask.selMappedGroups.selectedIndex==-1||
  262. document.frmTask.selMappedGroups.options
  263. [document.frmTask.selMappedGroups.selectedIndex].value=="")
  264. {
  265. document.frmTask.btnSetPrimary.disabled=true;
  266. document.frmTask.btnRemoveMappedGroup.disabled=true;
  267. }
  268. if( document.frmTask.selUNIXGroups.selectedIndex==-1||
  269. document.frmTask.selUNIXGroups.options
  270. [document.frmTask.selUNIXGroups.selectedIndex].value==""||
  271. document.frmTask.txtDomainGroup.value=="")
  272. {
  273. document.frmTask.btnAddDomainGroupMap.disabled=true;
  274. }
  275. else
  276. {
  277. document.frmTask.btnAddDomainGroupMap.disabled=false;
  278. }
  279. }
  280. </script>
  281. <%
  282. '-------------------------------------------------------------------------
  283. ' Function name: ServeEXPGROUPMAPPage(ByRef PageIn, ByVal bIsVisible)
  284. ' Description: Serves in displaying the page Header, Middle and
  285. ' Footer Parts (the group Interface)
  286. ' Input Variables: PageIn
  287. ' bIsVisible - the tab page be displayed?
  288. ' Output Variables: None
  289. ' Returns: None
  290. ' Global Variables: L_(*) - Localization content
  291. ' F_(*) - Form Variables
  292. '-------------------------------------------------------------------------
  293. Function ServeEXPGROUPMAPPage(ByRef PageIn, ByVal bIsVisible)
  294. On Error Resume Next
  295. Err.Clear
  296. If bIsVisible Then
  297. mstrPageName = "Intro"
  298. %>
  299. <table CLASS="TasksBody" VALIGN="middle" ALIGN="left" BORDER="0" CELLSPACING="0" CELLPADDING="3">
  300. <tr>
  301. <td CLASS="TasksBody">&nbsp;</td>
  302. <% If CInt(F_intGen_SelectedRadio) <> CONST_RADIO_USE_NISSERVER Then %>
  303. <td CLASS="TasksBody">&nbsp;</td>
  304. </tr>
  305. <% else %>
  306. <td CLASS="TasksBody">
  307. <%=L_NIS_DOMAIN_LABEL_TEXT%><BR>
  308. <input style="WIDTH: 300px" CLASS="FormField" name ="txtNISDomain" value="<%=F_strGen_NisDomain%>"
  309. onKeyUp="disableAddButton(document.frmTask.txtNISDomain,document.frmTask.btnUNIXGroups);"
  310. onChange="checkForDomainChange()">
  311. </td>
  312. </tr>
  313. <tr>
  314. <td CLASS="TasksBody">&nbsp;</td>
  315. <td CLASS="TasksBody">
  316. <%=L_NISSERVER_TEXT%><BR>
  317. <input style="WIDTH: 300px" name ="txtNISServer" CLASS="FormField" value='<%=F_strGen_NisServer%>'>
  318. </td>
  319. </tr>
  320. <% end if%>
  321. <tr>
  322. <td CLASS="TasksBody">&nbsp;</td>
  323. <td CLASS="TasksBody" align="right" style="WIDTH: 300px">
  324. <% Call SA_ServeOnClickButtonEx(L_LISTUNIXGROUPS_LABEL_TEXT, "", "GetUNIXGroups()", 110, 0, "","btnUNIXGroups") %>
  325. </td>
  326. </tr>
  327. <tr>
  328. <td CLASS="TasksBody">
  329. <%=L_WINDOWSGROUPS_LABEL_TEXT%><BR>
  330. <select name="selWinGroups" size=5 CLASS="FormField" style="WIDTH: 300px;"
  331. onChange="fnSetGroupButtonStatus();fnSetselectedindex(hdnNTSelectedIDToGroup,this);">
  332. <%
  333. Call DisplayNTLocalGroups(F_strSysAccountToGroup)
  334. %>
  335. </select>
  336. </td>
  337. <td CLASS="TasksBody">
  338. <%=L_UNIXGROUPS_LABEL_TEXT%><BR>
  339. <select name="selUNIXGroups" size=5 CLASS="FormField" STYLE="WIDTH: 300px"
  340. onChange="fnSetGroupButtonStatus();fnSetselectedindex(hdnNISSelectedIDToGroup,this);">
  341. <%
  342. Call DisplayNISGroups(F_strNisAccountToGroup)
  343. %>
  344. </select>
  345. </td>
  346. </tr>
  347. <tr>
  348. <td CLASS="TasksBody" align='left' colspan=2>
  349. <%=L_GROUPMAP_NOTE_TEXT%>&nbsp;&nbsp;&nbsp;&nbsp;
  350. <% Call SA_ServeOnClickButtonEx(L_ADD_LABEL_TEXT, "", "fnAddLocalGroupMap()", 50, 0, "DISABLED","btnAddLocalGroupMap") %>
  351. </td>
  352. </tr>
  353. <tr><td CLASS="TasksBody" colspan = 2>&nbsp;</td></tr>
  354. <tr>
  355. <td CLASS="TasksBody" colspan = 2><%=L_NFS_ADD_DOMAIN_GROUPMAP%>
  356. </td>
  357. </tr>
  358. <tr>
  359. <td CLASS="TasksBody" colspan = 2>
  360. <input style="WIDTH: 300px" CLASS="FormField" name ="txtDomainGroup" value= "<%=F_strDomainGroup%>" onclick="ClearErr();"
  361. onKeyUp='fnSetGroupButtonStatus();ClearErr();'>&nbsp;&nbsp;&nbsp;&nbsp;
  362. <%
  363. Call SA_ServeOnClickButtonEx(L_ADD_LABEL_TEXT, "", "fnAddDomainGroupMap()", 50, 0, "DISABLED","btnAddDomainGroupMap")
  364. %>
  365. </td>
  366. </tr>
  367. <tr>
  368. <td CLASS="TasksBody" colspan="2">
  369. <%=L_EXPLICITLYMAPPEDGROUPS_LABEL_TEXT%><BR>
  370. <select name="selMappedGroups" size="5" CLASS="TextArea" style="WIDTH: 620px;"
  371. onChange=' if (selectedIndex==0) { document.frmTask.btnSetPrimary.disabled = true;document.frmTask.btnRemoveMappedGroup.disabled = true;selectedIndex = -1; return;} else { document.frmTask.btnSetPrimary.disabled = false;document.frmTask.btnRemoveMappedGroup.disabled = false;};if(document.frmTask.selMappedGroups.options[document.frmTask.selMappedGroups.selectedIndex].value=="" || document.frmTask.selMappedGroups.options[document.frmTask.selMappedGroups.selectedIndex].value==null) { document.frmTask.btnSetPrimary.disabled = true;document.frmTask.btnRemoveMappedGroup.disabled = true; };fnSetselectedindex(document.frmTask.hdnMapsSelectedToGroup,this); '>
  372. <%
  373. Call DisplayGroupMappings(F_strMapsToGroup)
  374. %>
  375. </select>
  376. </td>
  377. </tr>
  378. <tr>
  379. <td CLASS="TasksBody" align="right" colspan="2">
  380. <% Call SA_ServeOnClickButtonEx(L_SETPRIMARY_LABEL_TEXT, "", "fnSetGroupPrimary()", 0, 0, "DISABLED","btnSetPrimary") %>
  381. &nbsp;&nbsp;
  382. <% Call SA_ServeOnClickButtonEx(L_REMOVE_LABEL_TEXT, "", "fnbRemove(document.frmTask.selMappedGroups,this,document.frmTask.btnSetPrimary);", 0, 0, "DISABLED","btnRemoveMappedGroup") %>
  383. </td>
  384. </tr>
  385. </table>
  386. <%
  387. End If
  388. ServeEXPGROUPMAPFooter()
  389. ServeEXPGROUPMAPPage = gc_ERR_SUCCESS
  390. End Function
  391. '-------------------------------------------------------------------------
  392. 'Function name: SetVariablesFromForm
  393. 'Description: Getting the data from Client
  394. 'Input Variables: None
  395. 'Output Variables: None
  396. 'Returns: None
  397. 'Global Variables: None
  398. ' Out:F_strLogonDomain 'Logon Domain Name
  399. ' Out:F_strGen_NisDomain 'NIS Domain
  400. ' Out:F_strGen_NisServer 'NIS Server
  401. ' Out:F_isNISDomain
  402. '--------------------------------------------------------------------------
  403. Function GetEXPGROUPMAPVariablesFromForm
  404. F_strMapsToGroup = Request.Form("hdnMapsToGroup")
  405. F_strSysAccountToGroup = Request.Form("hdnSysAccountToGroup")
  406. F_strNisAccountToGroup = Request.Form("hdnNisAccountToGroup")
  407. F_strDomainGroup = Request.Form("hdnDomainGroup")
  408. F_strNisGroupName = Request.Form("hdnNisGroupName")
  409. F_strNTSelectedIDToGroup = Request.Form("hdnNTSelectedIDToGroup")
  410. F_strNISSelectedIDToGroup = Request.Form("hdnNISSelectedIDToGroup")
  411. F_strMapsSelectedToGroup = Request.Form("hdnMapsSelectedToGroup")
  412. End Function
  413. '-------------------------------------------------------------------------
  414. ' Function name: SetEXPGROUPMAPVariablesFromSystem
  415. ' Description: Serves in getting the values from system
  416. ' Input Variables: None
  417. ' Output Variables: None
  418. ' Returns: None
  419. ' Global Variables: OUT:
  420. ' F_arrMapsToGroup
  421. ' F_arrSysAccountToGroup
  422. '-------------------------------------------------------------------------
  423. Sub GetEXPGROUPMAPVariablesFromSystem
  424. On Error Resume Next
  425. Err.Clear
  426. ' Get group mappings
  427. F_strMapsToGroup = NFS_GetGroupMappings(NFS_GetSFUConnection())
  428. ' Get system account
  429. F_strSysAccountToGroup = NFS_GetNTDomainGroups(F_strSystemName)
  430. End Sub
  431. Function DisplayNTLocalGroups(strGroups)
  432. On Error Resume Next
  433. Err.Clear
  434. Dim nIndex
  435. Dim arrGroups,arrField
  436. If strGroups = "" Then
  437. Exit Function
  438. End If
  439. arrGroups = Split(strGroups,"#")
  440. If isnull(arrGroups) Then
  441. Exit Function
  442. End If
  443. 'display the Groups
  444. Response.Write "<option selected>"& server.HTMLEncode("<unmapped>")&"</option>"
  445. For nIndex = 0 To ubound(arrGroups)
  446. arrField = Split(arrGroups(nIndex),":")
  447. Response.Write "<option VALUE=" & Chr(34) & arrField(0) & "\" & _
  448. arrField(1) & Chr(34) & ">" & _
  449. arrField(1) & "</option>"
  450. Next
  451. DisplayNTLocalGroups = True
  452. End Function
  453. Function DisplayNISGroups(strGroups)
  454. On Error Resume Next
  455. Err.Clear
  456. Dim i
  457. Dim nIndex
  458. Dim strValue
  459. Dim arrDomainGroups,arrField
  460. If strGroups = "" Then
  461. Exit Function
  462. End If
  463. ' Display the Groups of NIS
  464. arrDomainGroups = VBSortStringArray(strGroups)
  465. Response.Write "<option value='<unmapped>:-1' selected>"& server.HTMLEncode("<unmapped>")&"("&"-1"&")"&"</option>"
  466. For nIndex = 0 to ubound(arrDomainGroups)
  467. 'Split the enum value to get the Group name, ID and other specific details
  468. arrField = split(arrDomainGroups(nIndex),":")
  469. strValue = ""
  470. 'Check for the format
  471. if len(arrField) >= 2 then
  472. 'Display in format as UNIX Group name & Group ID
  473. Response.write"<option value ='"&arrField(0)&":"&arrField(1)&"'>"& arrField(0)&"(" & _
  474. arrField(1) &")</option>"
  475. end if
  476. next
  477. DisplayNISGroups = True
  478. End Function
  479. Function DisplayGroupMappings(strMappings)
  480. On Error Resume Next
  481. Err.Clear
  482. Dim nIndex
  483. Dim intIdx
  484. Dim strValue, strOutput
  485. Dim arrMappings, arrField,strSimpleMap
  486. 'Display heads
  487. Response.Write "<option value=''>"&VBFormatStringToColumns(L_WINDOWSGROUP_LISTHEADER_TEXT, _
  488. L_UNIXDOMAIN_LISTHEADER_TEXT,L_UNIXGROUP_LISTHEADER_TEXT,L_GID_LISTHEADER_TEXT,L_PRIMARY_LISTHEADER_TEXT)
  489. If strMappings = "" Then
  490. Exit Function
  491. End If
  492. ' display the data of Group mappings
  493. arrMappings = VBSortStringArray(strMappings)
  494. strOutput = ""
  495. For nIndex = 0 To ubound(arrMappings)
  496. If arrMappings(nIndex) <> "" Then
  497. arrField = Split(arrMappings(nIndex),":")
  498. strOutput = strOutput & "<option value='" &arrMappings(nIndex) & "'>"
  499. if arrField(0)= "*" then
  500. arrField(0) = "Yes"
  501. else
  502. arrField(0) = ""
  503. end if
  504. if arrField(3)= "PCNFS" then
  505. arrField(3) = "group file"
  506. end if
  507. strOutput = strOutput & VBFormatStringToColumns(arrField(1), _
  508. arrField(3),arrField(5),arrField(6),arrField(0))
  509. if err.number<> 0 then
  510. setErrMsg L_INVALIDUSERFORMAT_ERRORMESSAGE
  511. Exit Function
  512. end if
  513. End If
  514. Next
  515. Response.Write strOutput
  516. DisplayGroupMappings = True
  517. End Function
  518. '-------------------------------------------------------------------------
  519. 'Function name: UpdateGroupMaps
  520. 'Description: Updates the system with the new group maps
  521. 'Input Variables: None
  522. 'Output Variables: None
  523. 'Returns: True if no error else False
  524. 'Global Variables: Out:F_arrUserMaps
  525. ' In:L_NISDOMAINDOESNOTEXIST_ERRORMESSAGE
  526. ' In:L_SETTINGSRETRIEVFAILED_ERRORMESSAGE
  527. ' In:L_UPDATEFAILED_ERRORMESSAGE
  528. '--------------------------------------------------------------------------
  529. Function UpdateGroupMaps
  530. On Error Resume Next
  531. Err.Clear
  532. Dim arrGroupMaps
  533. Call SA_TRACEOUT("UpdateUserMaps",F_strMapsToUser)
  534. arrGroupMaps = Split(F_strMapsToGroup,"#")
  535. UpdateGroupMaps = NFS_SetGroupMappings(NFS_GetSFUConnection,arrGroupMaps)
  536. End Function
  537. Sub ServeEXPGROUPMAPFooter
  538. %>
  539. <input type="Hidden" name="hdnMapsToGroup" value="<%=F_strMapsToGroup%>">
  540. <input type="Hidden" name="hdnSysAccountToGroup" value="<%=F_strSysAccountToGroup%>">
  541. <input type="Hidden" name="hdnNisAccountToGroup" value="<%=F_strNisAccountToGroup%>">
  542. <input type="Hidden" name="hdnDomainGroup" value="<%=F_strDomainGroup%>">
  543. <input type="Hidden" name="hdnNisGroupName" value="<%=F_strNisGroupName%>">
  544. <input type="Hidden" name="hdnNTSelectedIDToGroup" value="<%=F_strNTSelectedIDToGroup%>">
  545. <input type="Hidden" name="hdnNISSelectedIDToGroup" value="<%=F_strNISSelectedIDToGroup%>">
  546. <input type="Hidden" name="hdnMapsSelectedToGroup" value="<%=F_strMapsSelectedToGroup%>">
  547. <input type='Hidden' name='hdnDomainChanged' value='0'>
  548. <%
  549. End Sub
  550. %>