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.

632 lines
21 KiB

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