Changeset 675 for trunk/guitools/shared


Ignore:
Timestamp:
Jan 1, 2012, 4:47:09 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI 2.5.x: Several fixes and additions (including fix for Ticket #185)

Location:
trunk/guitools/shared
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/cltinit.vrs

    r660 r675  
    6161        if exist.0 = 1 then samba.!smbclientexe = exist.1
    6262    end
     63    if samba.!smbclientexe = "" then do /* RPM/YUM/FHS tree */
     64        call charout , "  Are binaries in RPM/YUM/FHS tree? "
     65        ok = SysFileTree(UnixRoot'\usr\bin\smbclient.exe', exist.,'FO')
     66        if exist.0 = 1 then say "Yes."; else say "No."
     67        if exist.0 = 1 then samba.!smbclientexe = exist.1
     68    end
    6369    if samba.!smbclientexe = "" then do /* in parent directory? */
    6470        call charout , "  Are binaries in parent directory? "
     
    142148    ok = SysMkDir(unixetc)
    143149    ok = SysMkDir(etc'\samba')
     150    ok = SysMkDir(etc'\samba\pid')
    144151    ok = SysMkDir(etc'\samba\lock')
     152    /* This EA makes the testparm warning about browsing go away. */
     153    /* Note: The EA is NOT marked critical as it should be, neverthelesse this fix works */
     154    ok = SysPutEA(etc||'\samba\lock',"MODE", "FEFF0400ED410000"x)
    145155
    146156    /* Messages from Samba will go here */
  • trunk/guitools/shared/rxrpclib.vrs

    r665 r675  
    2727
    2828    count = 0
     29    SIGNAL ON SYNTAX NAME RPCERROR
    2930    do until lines(samba.!msg) = 0
    3031        rpcline = linein(samba.!msg)
     
    5051
    5152    end   
     53    SIGNAL OFF SYNTAX
    5254    ok = stream(samba.!msg,'c','close')
    5355    ok = SysFileDelete(samba.!msg)
     
    8183
    8284    count = 0
     85    SIGNAL ON SYNTAX NAME RPCERROR
    8386    do until lines(samba.!msg) = 0
    8487        rpcline = linein(samba.!msg)
     
    104107
    105108    end   
     109    SIGNAL OFF SYNTAX
    106110    ok = stream(samba.!msg,'c','close')
    107111    ok = SysFileDelete(samba.!msg)
     
    137141
    138142    count = 0
     143    SIGNAL ON SYNTAX NAME RPCERROR
    139144    do until lines(samba.!msg) = 0
    140145        rpcline = linein(samba.!msg)
     
    155160        end
    156161    end   
     162    SIGNAL OFF SYNTAX
    157163    ok = stream(samba.!msg,'c','close')
    158164    ok = SysFileDelete(samba.!msg)
     
    185191
    186192    count = 0
     193    SIGNAL ON SYNTAX NAME RPCERROR
    187194    do until lines(samba.!msg) = 0
    188195        rpcline = linein(samba.!msg)
     
    203210        end
    204211    end   
     212    SIGNAL OFF SYNTAX
    205213    ok = stream(samba.!msg,'c','close')
    206214    ok = SysFileDelete(samba.!msg)
     
    233241
    234242    Failure = 0
    235 
     243        SIGNAL ON SYNTAX NAME RPCERROR
    236244    do until lines(samba.!msg) = 0
    237245        rpcline = linein(samba.!msg)
     
    255263        end
    256264    end   
     265    SIGNAL OFF SYNTAX
    257266    ok = stream(samba.!msg,'c','close')
    258267    ok = SysFileDelete(samba.!msg)
     
    286295
    287296    count = 0
     297    SIGNAL ON SYNTAX NAME RPCERROR
    288298    do until lines(samba.!msg) = 0
    289299        rpcline = linein(samba.!msg)
     
    309319
    310320    end   
     321    SIGNAL OFF SYNTAX
    311322    ok = stream(samba.!msg,'c','close')
    312323    ok = SysFileDelete(samba.!msg)
     
    338349
    339350    Failure = 0
    340 
     351    SIGNAL ON SYNTAX NAME RPCERROR
    341352    do until lines(samba.!msg) = 0
    342353        rpcline = linein(samba.!msg)
     
    363374        end
    364375    end   
     376    SIGNAL OFF SYNTAX
    365377    ok = stream(samba.!msg,'c','close')
    366378    ok = SysFileDelete(samba.!msg)
     
    387399    if UserCred   = 'USERCRED'   | UserCred = '' | UserCred = '--user=%' then UserCred = '-N'
    388400
    389     say     '  'samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' >'samba.!msg
    390     address cmd samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' >'samba.!msg
     401    say     '  'samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'samba.!error' 1>'samba.!msg
     402    address cmd samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'samba.!error' 1>'samba.!msg
    391403
    392404    rpc.srvinfo. = ""
    393405
    394406    Failure = 0
    395 
     407    do while lines(samba.!error) > 0
     408        rpcline = linein(samba.!error)
     409        say "  "samba.!error":"rpcline
     410        if pos("UNSUCCESSFUL", rpcline) > 0 then do
     411            ok = stream(samba.!error,'c','close')
     412            ok = SysFileDelete(samba.!error)
     413            Failure = 1
     414            retval = 0
     415            rpc.srvinfo. = ""
     416            rpc.srvinfo.LOGONSTATUS=substr(rpcline,pos("NT_STATUS",rpcline),)
     417            IF options.!debug == 1 THEN SAY time()" _rpcsrvinfo() aborted, "retval
     418            return retval
     419        end
     420    end
     421
     422    SIGNAL ON SYNTAX NAME RPCERROR
    396423    do until lines(samba.!msg) = 0
    397424        rpcline = linein(samba.!msg)
     
    414441            rpc.srvinfo.SERVERSTRING = strip(rpc.srvinfo.SERVERSTRING)
    415442            say '  rpc.srvinfo.NETBIOSNAME  = "'rpc.srvinfo.NETBIOSNAME'"'
     443            say '  rpc.srvinfo.SERVERSTRING = "'rpc.srvinfo.SERVERSTRING'"'
    416444            rpc.srvinfo.CAPABILITIES = ""
    417445            do I = 1 to words(rpc.srvinfo.SERVERSTRING)
     446                say "Word "I":"word(rpc.srvinfo.SERVERSTRING,I)
    418447                if length(word(rpc.srvinfo.SERVERSTRING,I)) >=4 then leave
    419448                if length(word(rpc.srvinfo.SERVERSTRING,I)) = 2 | length(word(rpc.srvinfo.SERVERSTRING,I)) = 3 then do
     
    421450                end
    422451            end
    423             rpc.srvinfo.SERVERSTRING = strip(substr(rpc.srvinfo.SERVERSTRING,length(rpc.srvinfo.CAPABILITIES),))
    424             rpc.srvinfo.CAPABILITIES = strip(rpc.srvinfo.CAPABILITIES)
     452            if rpc.srvinfo.CAPABILITIES <> "" then do
     453                rpc.srvinfo.SERVERSTRING = strip(substr(rpc.srvinfo.SERVERSTRING,length(rpc.srvinfo.CAPABILITIES),))
     454                rpc.srvinfo.CAPABILITIES = strip(rpc.srvinfo.CAPABILITIES)
     455            end
    425456            say '  rpc.srvinfo.CAPABILITIES = "'rpc.srvinfo.CAPABILITIES'"'
    426457            say '  rpc.srvinfo.SERVERSTRING = "'rpc.srvinfo.SERVERSTRING'"'
    427458        end
    428     end   
     459    end
     460    SIGNAL OFF SYNTAX
     461
    429462    ok = stream(samba.!msg,'c','close')
    430463    ok = SysFileDelete(samba.!msg)
     
    436469    else do
    437470        retval = 0
     471        rpc.srvinfo. = ""
    438472        rpc.srvinfo.LOGONSTATUS=substr(rpcline,pos("NT_STATUS",rpcline),)
    439473    end
     
    441475    IF options.!debug == 1 THEN SAY time()" _rpcsrvinfo() done, "retval
    442476return retval
     477
     478RPCERROR:
     479    ok = stream(samba.!msg,'c','close')
     480    ok = SysFileDelete(samba.!msg)
     481    say "  rpc parsing error in line "sigl": "strip(sourceline(sigl))
     482    retval = -1
     483    IF options.!debug == 1 THEN SAY time()" _rpclibrary aborted, "retval
     484return retval
  • trunk/guitools/shared/sambainit.vrs

    r638 r675  
    7272        if exist.0 = 1 then samba.!smbd = exist.1
    7373    end
     74    if samba.!smbd = "" then do /* RPM/YUM/FHS tree */
     75        call charout , "  Are binaries in RPM/YUM/FHS tree? "
     76        ok = SysFileTree(UnixRoot'\usr\bin\smbd.exe', exist.,'FO')
     77        if exist.0 = 1 then say "Yes."; else say "No."
     78        if exist.0 = 1 then samba.!smbd = exist.1
     79    end
    7480    if samba.!smbd = "" then do /* in parent directory? */
    7581        call charout , "  Are binaries in parent directory? "
     
    234240    ok = SysMkDir(etc'\samba\spool')
    235241    ok = SysMkDir(etc'\samba\drivers')
     242    /* This EA makes the testparm warning about browsing go away. */
     243    /* Note: The EA is NOT marked critical as it should be, neverthelesse this fix works */
     244    ok = SysPutEA(ETC||'\samba\lock',"MODE", "FEFF0400ED410000"x)
    236245
    237246    /* use temporary smbpasswd created by pdbedit */
Note: See TracChangeset for help on using the changeset viewer.