Changeset 660
- Timestamp:
- Nov 10, 2011, 9:32:23 AM (14 years ago)
- Location:
- trunk/guitools
- Files:
-
- 1 added
- 2 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/guitools/evfsgui/changes
r653 r660 4 4 - Support server based logon scripts (requires REXX rpc library, 5 5 partly done) (works in a separate utility right now) 6 - TDB auch bei 3.5 CLUT kaputt7 6 - eigenes Icon fr ADMIN$ 8 7 - _AddSharesDisplay verwendet kein file2stem 8 - session user/password 9 9 10 10 Known problems: … … 16 16 17 17 Version 2.5.x 2011-??-?? 18 + Added: Create/maintain LMHosts automagically (speeds up connecting!!!) 18 + Added: Optionally store credentials in memory until next reboot 19 + Added: Properly verify all manually entered IP addresses 20 + Added: Connection speedup: Allow configuration of name resolve order 21 + Added: Connection speedup: Allow configuration of WINS server 22 + Added: Connection speedup: Optionally create/maintain LMHosts automagically 19 23 + Added: Enhanced, faster browsing code (major code refactoring) 20 24 + Added: Allow refreshing a single machine in the network neighbourhood -
trunk/guitools/evfsgui/evfsgui.vrp
r652 r660 10 10 VRXWindow: __VREMainWindow,1,1951,2361,891,7841 11 11 VRXWindow: __VREFileListWindow,1,2987,5155,2665,3358 12 VRXWindow: __VRESectionListWindow,1,3 830,10841,8082,332412 VRXWindow: __VRESectionListWindow,1,3903,10744,8082,4505 13 13 VRXWindow: __VREToolsWindow,0,2987,8528,6486,1669 14 VRXWindow: __VREWindListWindow,1,1 168,10841,2650,315014 VRXWindow: __VREWindListWindow,1,193,10841,3686,3150 15 15 UserFile: 1 16 16 UserWindow: Main,1 17 17 UserWindow: SW_LOGIN,1 18 UserWindow: SW_SETTINGS,1 19 UserWindow: SW_SMBTREE,1 20 UserWindow: SW_DIALOG,1 -
trunk/guitools/evfsgui/evfsgui.vrx
r652 r660 97 97 #append U:\Develop\Samba\trunk\guitools\shared\smbtree.vrs 98 98 #append U:\Develop\Samba\trunk\guitools\shared\textini.vrs 99 #append U:\Develop\Samba\trunk\guitools\shared\usercredmem.vrs 99 100 */ 100 101 return … … 782 783 if \VRFileExists( samba.!smbconf ) then call _CreateSmbConf 783 784 785 say _ucInitObj() 786 787 options.!storecreds = _ucChkObj() 788 784 789 IF STREAM( settings.!ini, 'C', 'QUERY EXISTS') == '' THEN DO 785 790 /* First start */ … … 919 924 end 920 925 926 /* Look for usable credentials */ 927 if options.!storecreds = 1 & _ucChkUc() then do 928 UserCred = _ucGetUc() 929 parse var UserCred '--user='Credentials.!username'%'Credentials.!password 930 ok = VRSet("EF_USER", "Value",Credentials.!username) 931 ok = VRSet("EF_PASSWORD","Value",Credentials.!password) 932 end 933 921 934 /* SambaInit.VRS needs these 2 */ 922 935 ShowHidden = advanced.!special … … 991 1004 IF options.!debug == 1 THEN SAY time()' '||"SaveSettings done" 992 1005 RETURN 1006 1007 /*:VRX _isValidIPAddress 1008 */ 1009 _isValidIPAddress: procedure 1010 ipaddr = arg(1) 1011 d. = '' 1012 d.0 = 4 1013 fail = 0 1014 parse var ipaddr d.1 '.' d.2 '.' d.3 '.' d.4 1015 do I = 1 to 4 1016 if datatype(d.I) = 'NUM' then do 1017 if d.I < 0 | d.I > 255 then fail = 1 1018 end 1019 else fail = 1 1020 if fail = 1 then leave 1021 end 1022 return(\fail) 993 1023 994 1024 /*:VRX _LMHostsRead … … 1064 1094 */ 1065 1095 _LoadOtherFuncs: 1066 CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 1067 CALL SysLoadFuncs 1096 call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 1097 call SysLoadFuncs 1098 1099 call rxfuncadd 'IniLoadFuncs', 'REXXINI', 'IniLoadFuncs' 1100 call IniLoadFuncs 1068 1101 1069 1102 call RxFuncAdd 'PRLoadFuncs', 'PR1UTIL', 'PRLoadFuncs' 1070 1103 call PRLoadFuncs 1104 1105 call RxFuncAdd 'RxuInit','Rxu','RxuInit' 1106 call RxuInit 1071 1107 return 1072 1108 … … 1317 1353 return 1318 1354 1355 /*:VRX _SmbConfCreateShadowCopy 1356 */ 1357 _SmbConfCreateShadowCopy: 1358 /* we create a complete version of smb.conf in temporary directory for reading purposes */ 1359 /* as we can only determine a default value from this complete version of the file */ 1360 /* however it is not desirable to always have a complete copy normally */ 1361 ok = SysFileDelete(samba.!shadowsmbconf) 1362 say samba.!testparmexe' -v -s 1>'samba.!shadowsmbconf' 2>'TempDir'testparm.stderr' 1363 address cmd samba.!testparmexe' -v -s 1>'samba.!shadowsmbconf' 2>'TempDir'testparm.stderr' 1364 return 1365 1319 1366 /*:VRX _SMBpdrInstalled 1320 1367 */ … … 1350 1397 options.!editmode = 0 1351 1398 options.!delay = 0 1399 options.!storecreds = 0 1352 1400 1353 1401 IF options.!debug == 1 THEN SAY ' initializing vfs. ' … … 1368 1416 advanced.!cachetimeout = '10' 1369 1417 advanced.!cachelistings = '32' 1418 1419 advanced.!smbconfchanged = 0 1370 1420 1371 1421 /* Obsolete */ … … 1470 1520 then UserCred = '--user='Credentials.!username'%'Credentials.!password 1471 1521 else UserCred = '--user='Credentials.!username'%%'Credentials.!password 1522 1523 if options.!storecreds = 1 & \(UserCred = 'USERCRED' | UserCred = '' | UserCred = '--user=%' | UserCred = '-N') then do 1524 ok = _ucSetUc() 1525 call beep 2400, 10 1526 end 1527 else call beep 200, 20 1472 1528 return 1473 1529 … … 1628 1684 CALL VRSet 'MENU_CONTEXT_DETACH', 'Visible', 1 1629 1685 CALL VRSet 'MENU_CONTEXT_OPEN', 'Visible', 1 1630 CALL VRSet 'MENU_CONTEXT_SEP1', 'Visible', 1 1686 /* CALL VRSet 'MENU_CONTEXT_SEP1', 'Visible', 1 */ 1631 1687 CALL VRSet 'MENU_CONTEXT_DETACH_ALL', 'Visible', 1 1632 CALL VRSet 'MENU_CONTEXT_SEP2', 'Visible', 1 1688 /* CALL VRSet 'MENU_CONTEXT_SEP2', 'Visible', 1 */ 1633 1689 1634 1690 END … … 1637 1693 CALL VRSet 'MENU_CONTEXT_DETACH', 'Visible', 0 1638 1694 CALL VRSet 'MENU_CONTEXT_OPEN', 'Visible', 0 1639 CALL VRSet 'MENU_CONTEXT_SEP1', 'Visible', 0 1695 /* CALL VRSet 'MENU_CONTEXT_SEP1', 'Visible', 0 */ 1640 1696 CALL VRSet 'MENU_CONTEXT_DETACH_ALL', 'Visible', 0 1641 CALL VRSet 'MENU_CONTEXT_SEP2', 'Visible', 0 1642 1697 /* CALL VRSet 'MENU_CONTEXT_SEP2', 'Visible', 0 */ 1643 1698 END 1644 1699 … … 2129 2184 */ 2130 2185 EF_PASSWORD_Change: 2186 Now = VRGet("EF_PASSWORD","value") 2187 if Now = "" | Now = LastPassword then return 2188 ok = SysSleep(1) 2189 LastPassword = Now 2190 if Now <> VRGet("EF_PASSWORD","value") then return 2131 2191 call _UserCredUpdate 2132 2192 return … … 2145 2205 2146 2206 /* Do nothing for incomplete IP addresses */ 2147 if strip(translate(VRGet("EF_SERVER","value"),copies(' ',11),'01234567890.')) = "" & length(VRGet("EF_SERVER","value")) < 7 then return 2207 if strip(translate(VRGet("EF_SERVER","value"),copies(' ',11),'01234567890.')) = "" then do /* got an IP address */ 2208 if \_IsValidIPAddress(VRGet("EF_SERVER","value")) then return /* it is invalid or incomplete */ 2209 end 2148 2210 2149 2211 machine = VRGet("EF_SERVER","value") … … 2198 2260 */ 2199 2261 EF_USER_Change: 2262 Now = VRGet("EF_USER","value") 2263 if Now = "" | Now = LastUser then return 2264 ok = SysSleep(1) 2265 LastUser = Now 2266 if Now <> VRGet("EF_USER","value") then return 2200 2267 call _UserCredUpdate 2268 return 2269 2270 /*:VRX EF_WINS_SERVER_Change 2271 */ 2272 EF_WINS_SERVER_Change: 2273 advanced.!smbconfchanged = 1 2201 2274 return 2202 2275 … … 2407 2480 options.!debug = 1 2408 2481 IF options.!debug == 1 THEN do 2409 ok = VRR EdirectStdIO("ON")2482 ok = VRRedirectStdIO("ON") 2410 2483 say time()' Main_Create started' 2411 2484 end 2412 else ok = VRR EdirectStdIO("OFF")2485 else ok = VRRedirectStdIO("OFF") 2413 2486 2414 2487 call _LoadOtherFuncs … … 3048 3121 */ 3049 3122 Menu_Help_Extended_Click: 3050 call PB_HELP_Click3123 ok = VRMethod( "Main", "InvokeHelp" ) 3051 3124 return 3052 3125 … … 3061 3134 Menu_Selected_Default_Workgroup_Click: 3062 3135 workgroupname = VRMethod("CN_SMBTREE","GetRecordAttr",SMBObj.rh,"Caption") 3136 /* FIXME: switch over to REXXIni calls */ 3063 3137 ok = TRSetIni("[global]","workgroup", workgroupname, samba.!smbconf) 3064 3138 return … … 3636 3710 ok = VRSet("EF_USER","Value",VRGet("EF_USER1","Value")) 3637 3711 ok = VRSet("EF_PASSWORD","Value",VRGet("EF_PASSWORD1","Value")) 3712 options.!storecreds = VRGet("CB_STORECREDS1","Set") 3638 3713 credentials.!entered = 1 3639 3714 … … 3831 3906 3832 3907 /* Note: CB_LOGGING has its own event tied to the click */ 3833 3908 options.!storecreds = VRGet("CB_STORECREDS", "Set" ) 3834 3909 options.!debug = VRGet("CB_DEBUG", "Set" ) 3835 3910 … … 3867 3942 call _LMHostsUpdate 3868 3943 end 3944 if advanced.!smbconfchanged = 1 then do 3945 name_resolve_order = VRGet("SPIN_NRO1","value")' 'VRGet("SPIN_NRO2","value")' 'VRGet("SPIN_NRO3","value")' 'VRGet("SPIN_NRO4","value") 3946 handle = IniOpen('global', samba.!smbconf) 3947 call IniSet 'name resolve order', name_resolve_order, handle 3948 /* FIXME: Throw an error in this case */ 3949 if \_IsValidIPAddress(VRGet("EF_WINS_SERVER","Value")) then ok = VRSet("EF_WINS_SERVER","Value","") 3950 call IniSet 'wins server', VRGet("EF_WINS_SERVER","Value"), handle 3951 call IniSave handle 3952 call IniClose handle 3953 advanced.!smbconfchanged = 0 3954 ok = VRSet("PB_SETTINGS_UNDO","Enabled", 0) 3955 end 3869 3956 return 3870 3957 … … 4005 4092 /*:VRX PB_SMBTREE_REFRESH_Click 4006 4093 */ 4007 PB_SMBTREE_REFRESH_Click: PROCEDURE EXPOSE settings. options. icons. fs. samba. debuglevel advanced. UserCred Refreshmode Tempdir4094 PB_SMBTREE_REFRESH_Click: /* PROCEDURE EXPOSE settings. options. icons. fs. samba. debuglevel advanced. UserCred Refreshmode Tempdir */ 4008 4095 IF options.!debug == 1 THEN SAY time()' '||"PB_REFRESH_Click started" 4009 4096 … … 4096 4183 4097 4184 ok = VRSet("MENU_CONTEXT_OPEN", "Visible", 0) 4098 ok = VRSet("MENU_CONTEXT_SEP1", "Visible", 0) 4185 /* ok = VRSet("MENU_CONTEXT_SEP1", "Visible", 0) */ 4099 4186 ok = VRSet("MENU_CONTEXT_DETACH", "Visible", 0) 4100 4187 ok = VRSet("MENU_CONTEXT_UNMOUNT", "Visible", 0) … … 4126 4213 IF options.!debug == 1 THEN SAY time()' '||"Refresh done" 4127 4214 RETURN 0 4215 4216 /*:VRX SPIN_NRO1_Change 4217 */ 4218 SPIN_NRO1_Change: 4219 advanced.!smbconfchanged = 1 4220 return 4221 4222 /*:VRX SPIN_NRO2_Change 4223 */ 4224 SPIN_NRO2_Change: 4225 advanced.!smbconfchanged = 1 4226 return 4227 4228 /*:VRX SPIN_NRO3_Change 4229 */ 4230 SPIN_NRO3_Change: 4231 advanced.!smbconfchanged = 1 4232 return 4233 4234 /*:VRX SPIN_NRO4_Change 4235 */ 4236 SPIN_NRO4_Change: 4237 advanced.!smbconfchanged = 1 4238 return 4128 4239 4129 4240 /*:VRX SPLIT_Main_Move … … 4385 4496 */ 4386 4497 SW_LOGIN_Create: 4387 call SW_LOGIN_Init 4388 CALL NLVSetText 'DT_USER1', "Caption", 25 4389 CALL NLVSetText 'DT_PASSWORD1', "Caption", 26 4498 call SW_LOGIN_Init 4499 CALL NLVSetText 'DT_USER1', "Caption", 25 4500 CALL NLVSetText 'DT_PASSWORD1', "Caption", 26 4501 CALL NLVSetText 'CB_STORECREDS1', "Caption", 135 4390 4502 CALL NLVSetText 'PB_LOGIN_OK', "Caption", 2 4391 4503 CALL NLVSetText 'PB_LOGIN_CANCEL',"Caption", 3 4504 4392 4505 /* ok = VRSet("Pict_Login","PicturePath", SMBObj.icon) */ 4393 4506 ok = VRSet("EF_USER1","Value",VRGet("EF_USER","Value")) 4394 4507 ok = VRSet("EF_PASSWORD1","Value",VRGet("EF_PASSWORD","Value")) 4508 ok = VRSet("CB_STORECREDS1","Set",options.!storecreds) 4395 4509 return 4396 4510 … … 4609 4723 call NLVSetText "CB_BROADCAST", "Caption", 74 4610 4724 call NLVSetText "CB_MINIICONS", "Caption", 70 4725 call NLVSetText "CB_STORECREDS", "Caption", 135 4611 4726 4612 4727 /* Buttons */ … … 4625 4740 */ 4626 4741 SW_SETTINGS_Init_Content: 4742 ok = VRSet("PB_SETTINGS_UNDO","Enabled", 1) 4743 4627 4744 if advanced.!browseauth \= "" then ok = VRSet("CB_BROWSEAUTH", "Set", advanced.!browseauth) 4628 4745 if advanced.!browseimme \= "" then ok = VRSet("CB_BROWSEIMME", "Set", advanced.!browseimme) … … 4634 4751 call VRSet "CB_LOGGING", "Set", VRFileExists(SysBootDrive()"\ndpsmb.dbg") 4635 4752 if options.!debug \= "" then ok = VRSet("CB_debug", "Set", options.!debug) 4753 if options.!storecreds \= "" then ok = VRSet("CB_STORECREDS", "Set", options.!storecreds) 4636 4754 4637 4755 if advanced.!miniicons \= "" then ok = VRSet("CB_MINIICONS", "Set", advanced.!miniicons) … … 4640 4758 if advanced.!logfile \= "" then ok = VRSet("EF_LOGFILE", "Value", advanced.!logfile) 4641 4759 if advanced.!loglevel \= "0" then ok = VRSet("SPIN_LOGLEVEL", "Value", advanced.!loglevel) 4760 4761 call _SmbConfCreateShadowCopy 4762 4763 wins_support = translate(IniGet('wins support', 'global', samba.!shadowsmbconf)) 4764 4765 if wins_support = "YES" then do /* we are a WINS server ourself */ 4766 ok = VRSet("DT_WINS_SERVER","Enabled", 0) 4767 ok = VRSet("EF_WINS_SERVER","BackColor", "PaleGray") 4768 ok = VRSet("EF_WINS_SERVER","Value", "") 4769 ok = VRSet("EF_WINS_SERVER","Enabled", 0) 4770 end 4771 else do 4772 ok = VRSet("EF_WINS_SERVER","Value", IniGet('wins server', 'global', samba.!shadowsmbconf)) 4773 end 4774 4775 name_resolve_order = IniGet('name resolve order', 'global', samba.!shadowsmbconf) 4776 4777 do I = 1 to words(name_resolve_order) 4778 ok = VRSet("SPIN_NRO"||I, "value", word(name_resolve_order,I)) 4779 end 4780 4781 advanced.!smbconfchanged = 0 4642 4782 return 4643 4783 -
trunk/guitools/evfsgui/rc/lang/evfsi_de.mkm
r653 r660 144 144 EVG0133I: LMHosts verwalten 145 145 EVG0134I: TRAC Wiki Notation anfgen 146 EVG0135I: Anmeldeinformationen speichern -
trunk/guitools/evfsgui/rc/lang/evfsi_en.mkm
r653 r660 144 144 EVG0133I: Manage LMHosts 145 145 EVG0134I: Add TRAC Wiki markup 146 EVG0135I: Store credentials until next reboot -
trunk/guitools/evfsgui/rc/lang/evfsi_fr.mkm
r653 r660 150 150 EVG0133I: Grer le fichier LMHosts 151 151 EVG0134I: Ajouter TRAC Wiki balisage 152 EVG0135I: Rfrences magasin jusqu'au prochain redmarrage -
trunk/guitools/evfsgui/rc/lang/evfsi_it.mkm
r653 r660 148 148 EVG0133I: Gestire il file LMHosts 149 149 EVG0134I: Aggiungi TRAC Wiki markup 150 EVG0135I: Credenziali di memorizzare fino al riavvio successivo -
trunk/guitools/shared/cltinit.vrs
r638 r660 124 124 IF options.!debug == 1 THEN say ' Samba smb.conf = "'samba.!smbconf'"' 125 125 126 /* complete shadow copy of smb.conf in temporary directory - should always be created on the fly */ 127 /* before reading from it */ 128 samba.!shadowsmbconf = TempDir||'smb.conf' 129 130 /* lmhosts */ 131 samba.!lmhosts = ETC'\samba\lmhosts' 132 if \VRFileExists(samba.!lmhosts) then call _ErrorDataFileNotFound samba.!lmhosts' is not present.' 133 IF options.!debug == 1 THEN say ' Samba lmhosts = "'samba.!lmhosts'"' 134 135 /* FIXME: Needs to be changed for Samba 3.3+ */ 126 136 /* upcase table files - several utilities need these */ 127 137 if (\VRFileExists(samba.!bin'\lib\upcase.dat')) |, -
trunk/guitools/shared/smbtree.vrs
r643 r660 172 172 ok = VRSet("TM_RefreshTreeDisplay","Delay", 1000) 173 173 ok = VRSet("CN_smbtree","Enabled", 1) 174 if DoLMHosts = 1 then do 175 call _LMHostsRead 176 call _LMHostsUpdate 177 end 174 178 ok = VRSet("CN_smbtree", "Painting", 0 ) 175 179 ok = VRSet("CN_smbtree", "Painting", 1 ) … … 510 514 return IPStr'|'MAC'|'Roles 511 515 516 517 512 518 /*:VRX file2stem 513 519 */ … … 515 521 msgfile = arg(1) 516 522 msgstem = arg(2) 523 delmsgfile = translate(arg(3)) 517 524 if right(msgstem,1) <> '.' then msgstem = msgstem'.' 518 525 say ' file2stem("'msgfile'","'msgstem'")' … … 533 540 interpret dyn 534 541 ok = stream(msgfile,'c','close') 535 ok = SysFileDelete(msgfile)542 if delMsgFile <> "NODEL" then ok = SysFileDelete(msgfile) 536 543 drop msgfile msgstem 537 544 return stemcount
Note:
See TracChangeset
for help on using the changeset viewer.