Changeset 784


Ignore:
Timestamp:
Aug 8, 2013, 9:56:12 AM (12 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Changes in order to work around % issue

Location:
trunk/guitools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/evfsgui/evfsgui.vrp

    r769 r784  
    33VRX: wps_open.VRX
    44VXOFile: VROBJEX
    5 VXOFile: VRSPLIT
     5ClassFile: VRSPLITB.DLL
    66MacroPath: VRM:U:\Develop\Samba\trunk\guitools\evfsgui
    77EXEPath:
     
    1111VRXWindow: __VREFileListWindow,1,2192,7950,2665,3358
    1212VRXWindow: __VRESectionListWindow,1,1156,12382,12238,6914
    13 VRXWindow: __VREToolsWindow,0,3096,8528,6486,1669
     13VRXWindow: __VREToolsWindow,0,3096,8528,5474,1669
    1414VRXWindow: __VREWindListWindow,1,723,8239,4963,3150
    1515UserFile: 1
  • trunk/guitools/evfsgui/evfsgui.vrx

    r769 r784  
    11351135_LoadOtherFuncs:
    11361136    IF options.!debug == 1 then say time()' _LoadotherFuncs() started'
    1137     SIGNAL ON SYNTAX NAME DLLMissing
     1137    SIGNAL ON SYNTAX
    11381138
    11391139    call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
     
    11531153return
    11541154
    1155 DLLMissing:
     1155SYNTAX:
    11561156    Fatal = 1
    1157     call VRMessage 'Main', 'REXX function library 'strip(translate(word(sourceline(SIGL-1),4),'  ',"',"))'.DLL is missing!', "EVFSGUI fatal error", "E"
     1157    xxx = strip(translate(word(sourceline(SIGL-1),4),'  ',"',"))
     1158    call VRMessage 'Main', 'REXX function library 'xxx'.DLL is missing!', "EVFSGUI fatal error", "E"
    11581159signal Quit
    11591160
     
    16351636    credentials.!password = VRGet("EF_PASSWORD","Value")
    16361637
    1637     if pos("4OS2", value("COMSPEC",,"OS2ENVIRONMENT")) = 1
     1638    if pos("4OS2", value("COMSPEC",,"OS2ENVIRONMENT")) = 1 | pos(left(credentials.!password,1),'01234567890') > 0
    16381639        then UserCred = '--user='Credentials.!username'%%'Credentials.!password
    16391640        else UserCred = '--user='Credentials.!username'%'Credentials.!password
  • trunk/guitools/shared/smbtree.vrs

    r769 r784  
    1515    samba.!serverlist = TempDir'smbtree.srvlst'
    1616
    17     /* smbtree -S = List workgroups (domains) and servers of tree */
     17    /* smbtree -b = Use broadcast instead of using the master browser
     18       smbtree -D = List only domains (workgroups) of tree
     19       smbtree -S = List domains(workgroups) and servers of */
    1820    say       '  detach 'samba.!smbtreeexe' 'BroadCast' -S 'UserCred' 'debuglevel' >'samba.!serverlist
    1921    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -S 'UserCred' 'debuglevel' >'samba.!serverlist
     
    118120                say '  Possible workgroup: "'smbtreeline.sl'"'
    119121                /* check for eventual error messages */
    120                 if pos("RECEIVING",translate(smbtreeline.sl)) > 0 | pos("TDB(",translate(smbtreeline.sl)) > 0 then do
     122                if pos("RECEIVING",translate(smbtreeline.sl)) > 0 | pos("NT_STATUS",translate(smbtreeline.sl)) > 0 then do
    121123                    Msg.Type = "W"
    122124                    Msg.Text = smbtreeline.sl
     
    168170    if UserCred   = 'USERCRED'   | UserCred = '' | UserCred = '--user=%' | UserCred = '--user=%%' then UserCred = '-N'
    169171
     172    /* We have to remove the double % for smbclient.exe - not entirely clear why */
     173    OldUserCred = ""
     174    if pos('%%',UserCred) > 0 & pos("4OS2", value("COMSPEC",,"OS2ENVIRONMENT")) = 0  then do
     175        OldUserCred = UserCred
     176        parse var UserCred '--user='username'%%'password
     177        UserCred = '--user='username'%'password
     178        say "  Strip double %%!!!"
     179    end
     180
    170181    say       '  detach 'samba.!smbclientexe' -L "'machine'" 'UserCred' 'debuglevel' 2>'smbmachine' 1>&2'
    171    
    172182    address cmd 'detach 'samba.!smbclientexe' -L "'machine'" 'UserCred' 'debuglevel' 2>'smbmachine' 1>&2'
    173183
     
    176186        parse var UserCred '--user='username'%'.
    177187        ok = VRSet("CN_SMBTREE","Caption","User context: "username)
     188    end
     189   
     190    if OldUserCred <> "" then do
     191        UserCred = OldUserCred
     192        OldUserCred = ""
     193        say "  Restore double %%!!!"
    178194    end
    179195   
     
    420436
    421437    call VRSet VRWindow(), 'Pointer', 'Wait'
    422     say       '  detach 'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
    423     address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     438   
     439    /* smbtree -b = Use broadcast instead of using the master browser
     440       smbtree -D = List only domains (workgroups) of tree
     441       smbtree -S = List domains(workgroups) and servers of */
     442    say       '  detach 'samba.!smbtreeexe' 'BroadCast' -D 'UserCred' 'debuglevel' >'samba.!msg
     443    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'UserCred' 'debuglevel' >'samba.!msg
    424444
    425445    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Enumerating workgroups")
     
    598618        stemcount = stemcount + 1
    599619        inline = linein(msgfile)
    600         if pos('creating lame',inline) > 0 then do
     620        if pos('creating lame',inline) > 0 | pos('tdb(',inline) > 0 then do
    601621            stemcount = stemcount - 1
    602622            iterate
     
    608628    interpret dyn
    609629    ok = stream(msgfile,'c','close')
    610     if delMsgFile <> "NODEL" then ok = SysFileDelete(msgfile)
     630    /* if delMsgFile <> "NODEL" then ok = SysFileDelete(msgfile) */
     631   
    611632    drop msgfile msgstem
    612633    say time()' file2stem() done'   
  • trunk/guitools/smbmon/smbmon.vrp

    r770 r784  
    88VRXWindow: __VREMainWindow,1,2180,3614,1024,6769
    99VRXWindow: __VRESectionListWindow,1,4083,11226,7372,6589
    10 VRXWindow: __VREToolsWindow,1,2156,1494,6489,1659
     10VRXWindow: __VREToolsWindow,1,2156,1494,4968,1665
    1111VRXWindow: __VREWindListWindow,1,964,11708,3132,3150
    1212UserFile: 1
  • trunk/guitools/smbmon/smbmon.vrx

    r770 r784  
    12531253
    12541254        call _RefreshDaemonsDelay
    1255 
    12561255        DRH = VRInfo("Record")
     1256        DaemonName = ""
     1257
    12571258        OH = VRInfo("Object")
    1258         ok = VRset("ContextMenu_Daemons_Sep1","Visible", 0 )
    1259         ok = VRset("ContextMenu_Daemons_Ping","Visible", (DRH <> "") )
    1260         ok = VRset("ContextMenu_Daemons_Shutdown","Visible", 0 )
    1261         DaemonName = ""
    1262         if DRH <> "" then DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")
     1259        ok = VRset("ContextMenu_Daemons_Details",   "Visible", 1 )
     1260        ok = VRset("ContextMenu_Daemons_Tree",      "Visible", 1 )
     1261        ok = VRset("MItem_9",                       "Visible", 1 )
     1262        ok = VRset("ContextMenu_Daemons_Sort",      "Visible", 1 )
     1263        ok = VRset("ContextMenu_Daemons_MiniIcons", "Visible", 1 )
     1264        ok = VRset("MItem_13",                      "Visible", 1 )
     1265        ok = VRset("ContextMenu_Daemons_Ping",      "Visible", 1 )
     1266        ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 1 )
     1267        ok = VRset("ContextMenu_Daemons_Start",     "Visible", 1 )
     1268        ok = VRset("ContextMenu_Daemons_Shutdown",  "Visible", 1 )
     1269
     1270        if DRH <> "" then do
     1271            DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")
     1272            ok = VRset("ContextMenu_Daemons_Ping","Visible", 1 )
     1273        end
     1274
    12631275        select
    1264             when Words(DaemonName) = 3 then do /* a child process with PID in name */
     1276            when Words(DaemonName) = 3 & pos("PID ",DaemonName) > 0 then do /* a child process with PID in name */
    12651277                DaemonName = word(DaemonName,2)
    1266                 ok = VRset("ContextMenu_Daemons_Sep1","Visible", 1 )
    12671278                ok = VRSet("ContextMenu_Daemons_KillPID", "Caption", NLVGetMessage( 38, DaemonName))
    1268                 ok = VRset("ContextMenu_Daemons_KillPID",  "Visible", 1 )
    12691279                ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 )
    1270                 ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 1 )
    1271                 ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
    12721280            end
    1273             when Words(DaemonName) = 1 then do /* on smbd.exe or nmbd.exe root processes */
     1281            when Words(DaemonName) = 1 & (pos("mbd.exe",Daemonname) > 0 | pos("winbindd.exe",Daemonname) > 0) then do /* on root process */
    12741282                parse var DaemonName DaemonName'.exe'
    12751283                if strip(VRMethod("CN_Daemons", "GetFieldData", DRH, DPidsFH)) <> "" then do
    1276                     ok = VRSet("ContextMenu_Daemons_Shutdown", "Caption", NLVGetMessage( 33, DaemonName))
    1277                     ok = VRset("ContextMenu_Daemons_Shutdown", "Visible", 1 )
    1278                     ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 )
    1279                     ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
    1280                 end
    1281                 else do
    1282                     ok = VRSet("ContextMenu_Daemons_Start", "Caption", NLVGetMessage( 36, DaemonName))
    1283                     ok = VRset("ContextMenu_Daemons_Start", "Visible", 1 )
    1284                     ok = VRset("ContextMenu_Daemons_KillPID","Visible", 0 )
    1285                     ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 0 )
    1286                     ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
     1284                    ok = VRSet("ContextMenu_Daemons_Shutdown",  "Caption", NLVGetMessage( 33, DaemonName))
     1285                    ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 0 )
     1286                    ok = VRset("ContextMenu_Daemons_Start",     "Visible", 0 )
    12871287                end
    12881288            end
    1289             otherwise nop
     1289            when pos("\", DaemonName) > 0 then do /* we are on a file */
     1290                ok = VRset("MItem_13",                      "Visible", 0 )
     1291                ok = VRset("ContextMenu_Daemons_Ping",      "Visible", 0 )
     1292                ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 0 )
     1293                ok = VRset("ContextMenu_Daemons_Start",     "Visible", 0 )
     1294                ok = VRset("ContextMenu_Daemons_Shutdown",  "Visible", 0 )
     1295            end
     1296            otherwise do /* we are on a user */
     1297                ok = VRset("MItem_13",                      "Visible", 0 )
     1298                ok = VRset("ContextMenu_Daemons_Ping",      "Visible", 0 )
     1299                ok = VRset("ContextMenu_Daemons_KillPID",   "Visible", 0 )
     1300                ok = VRset("ContextMenu_Daemons_Start",     "Visible", 0 )
     1301                ok = VRset("ContextMenu_Daemons_Shutdown",  "Visible", 0 )
     1302            end
    12901303        end
    12911304        say '  Daemon is "'DaemonName'"'
Note: See TracChangeset for help on using the changeset viewer.