Changeset 675


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
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/evfsgui/changes

    r665 r675  
    1515  to work properly
    1616 
    17 Version 2.5.x 2011-??-??
     17Version 2.5.x 2012-??-??
     18+ Added: -timesync switch, allows time sync using commandline
     19+ Added: Support time synchronisation (requires new net.exe)
    1820+ Added: Error handler for missing REXX DLLs
    1921+ Added: Identify user using RPC library
     
    3941           convert global settings and advanced connection options
    4042           from windows into notebook pages
     43! Fixed: Ticket #185 (create %ETC%/samba/pid and fix the EA of
     44         %ETC%/samba/lock)
     45! Fixed: Context menu in connection details view could show wrong menu items           
    4146! Fixed: Do not add a *-"server" to the networkneighbourhood if a workgroup
    4247         was mounted.
     
    4853! Fixed: "Creating lame upcase tables" filtered
    4954! Fixed: Do not run nmblookup.exe twice in the foreground
     55! Fixed: Errorhandler for parsing errors in RPC library (still not perfect)
    5056- Removed: Bottom button row
    5157- Removed: View Menu
  • trunk/guitools/evfsgui/evfsgui.vrp

    r665 r675  
    1515UserFile: 1
    1616UserWindow: Main,1
    17 UserWindow: SW_LOGIN,1
     17UserWindow: SW_SMBTREE,1
     18UserWindow: SW_DIALOG,1
  • trunk/guitools/evfsgui/evfsgui.vrx

    r665 r675  
    443443*/
    444444_ContextMenuSelectedSet:
     445    /* Fixme: This routine only works for CN_SMBTREE right now */
     446
    445447    /* Hide all context menu entries */
    446448    ok = VRSet("Menu_Selected_Remove",           "Visible", 0) /* CN_CONDET */
     
    449451    ok = VRSet("Menu_Selected_Sep1",             "Visible", 0) /* CN_SMBTREE */
    450452    ok = VRSet("Menu_Selected_Info",             "Visible", 0) /* CN_SMBTREE */
     453    ok = VRSet("Menu_Selected_TimeSync",         "Visible", 0) /* CN_SMBTREE */
    451454    ok = VRSet("Menu_Selected_Refresh",          "Visible", 0) /* CN_SMBTREE */
    452455    ok = VRSet("Menu_Selected_Default_Workgroup","Visible", 0) /* CN_SMBTREE */
    453456
    454457
    455 ok = VRSet("Menu_Selected_TreeView","Visible",1)
    456 ok = VRSet("Menu_Selected_DetailsView","Visible",1)
     458/*  ok = VRSet("Menu_Selected_TreeView","Visible",1)
     459    ok = VRSet("Menu_Selected_DetailsView","Visible",1)
     460 */
    457461    select
    458462        when SMBObj.udatatype = "DISK" then do
     
    463467            ok = VRSet("Menu_Selected_Sep1",             "Visible", 1)
    464468            ok = VRSet("Menu_Selected_Info",             "Visible", 1)
     469            ok = VRSet("Menu_Selected_TimeSync",         "Visible", 1)
    465470            ok = VRSet("Menu_Selected_Refresh",          "Visible", 1)
    466471        end
     
    718723    CALL NLVSetText 'Menu_Selected_Retry',            "Caption", 90
    719724    CALL NLVSetText 'Menu_Selected_Info',             "Caption", 92
     725    CALL NLVSetText 'Menu_Selected_TimeSync',         "Caption", 129
    720726    CALL NLVSetText 'Menu_Selected_Refresh',          "Caption", 38
    721727    CALL NLVSetText 'Menu_Selected_Default_Workgroup',"Caption", 75
     
    11461152        IF options.!debug == 1 THEN SAY "  -NOGUI switch detected"
    11471153        CmdLine = delWord(CmdLine,wordpos('-NOGUI',upCmdLine),1)
     1154        upCmdLine = translate(CmdLine)
     1155    end
     1156
     1157    if wordpos('-TIMESYNC',upCmdLine) > 0 then do
     1158        options.!timesync = 1
     1159        IF options.!debug == 1 THEN SAY "  -TIMESYNC switch detected"
     1160        dwpos = wordpos('-TIMESYNC',upCmdLine)
     1161        if dwpos = words(upCmdLine) then do /* TIMESYNC was last parm - assume automatic */
     1162            options.!timesrv = ""
     1163            CmdLine = delWord(CmdLine,wordpos('-TIMESYNC',upCmdLine),1)
     1164        end
     1165        else do
     1166            options.!timesrv = word(upCmdLine,dwpos+1)
     1167            if left(options.!timesrv,1) = "-" then do /* other parameter detected */
     1168                options.!timesrv = ""
     1169                CmdLine = delWord(CmdLine,wordpos('-TIMESYNC',upCmdLine),1)
     1170            end
     1171            else do /* seems we have a timeserver - IP or name - no further check */
     1172                CmdLine = delWord(CmdLine,wordpos('-TIMESYNC',upCmdLine),2)
     1173            end
     1174        end
    11481175        upCmdLine = translate(CmdLine)
    11491176    end
     
    14111438    options.!delay      = 0
    14121439    options.!storecreds = 0
     1440    options.!timesync   = 0
     1441    options.!timesrv    = ''
    14131442
    14141443    IF options.!debug == 1 THEN SAY '  initializing vfs. '
     
    14871516_TabbedDialogSetup:
    14881517    IF options.!debug == 1 THEN SAY time()' _TabbedDialogSetup started'
     1518
    14891519    w = VRLoad( "TDL_1", VRWindowPath(), "SW_DIALOG" )
    14901520    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(13)" ")
     
    14931523    ok = VRMethod( "TDL_1", "InsertPage", w,"- "NLVGetMessage(40)" ")
    14941524    ok = VRMethod( "TDL_1", "SetStatusText", 2, NLVGetMessage(132,"2","2"))
     1525
    14951526    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SMBTREE" )
    14961527    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(39)" ")
     1528
    14971529    w = VRLoad( "TDL_1", VRWindowPath(), "SW_CONDET" )
    14981530    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(63)" ")
     
    15171549    ok = VRMethod( "TDL_1", "SetTabText", 4, strip(VRMethod( "TDL_1", "GetTabText", 4)))
    15181550    ok = VRMethod( "TDL_1", "SetTabText", 5, strip(VRMethod( "TDL_1", "GetTabText", 5)))
     1551return
     1552
     1553/*:VRX         _TimeSync
     1554*/
     1555_TimeSync:
     1556    IF options.!debug == 1 THEN SAY time()' _TimeSync started, "'options.!timesrv'"'
     1557    if options.!timesrv <> '' then do
     1558        say     '  'samba.!netexe' time set -S 'options.!timesrv
     1559        address cmd samba.!netexe' time set -S 'options.!timesrv
     1560    end
     1561    else do
     1562        say     '  'samba.!netexe' time set'
     1563        address cmd samba.!netexe' time set'
     1564    end
     1565    options.!timesync = ''
     1566    IF options.!debug == 1 THEN SAY time()' _TimeSync done'
    15191567return
    15201568
     
    16211669    if VRMethod( "CN_CONDET", "ValidateRecord", rh) <> 1 then return
    16221670
     1671    /* Hide all context menu entries */
     1672    ok = VRSet("Menu_Selected_Remove",           "Visible", 0) /* CN_CONDET */
     1673    ok = VRSet("Menu_Selected_Retry",            "Visible", 0) /* CN_CONDET */
     1674    ok = VRSet("Menu_Selected_Connect",          "Visible", 0) /* CN_SMBTREE */
     1675    ok = VRSet("Menu_Selected_Sep1",             "Visible", 0) /* CN_SMBTREE */
     1676    ok = VRSet("Menu_Selected_Info",             "Visible", 0) /* CN_SMBTREE */
     1677    ok = VRSet("Menu_Selected_TimeSync",         "Visible", 0) /* CN_SMBTREE */
     1678    ok = VRSet("Menu_Selected_Refresh",          "Visible", 0) /* CN_SMBTREE */
     1679    ok = VRSet("Menu_Selected_Default_Workgroup","Visible", 0) /* CN_SMBTREE */
     1680
    16231681    /* This is the place to enable specific context menu entries */
    16241682    ok = VRMethod( "CN_CONDET", "GetRecordList", "All", "records." )
     
    25242582    if advanced.!savepassive == 1 then CALL _PassiveLoad
    25252583
     2584    IF options.!timesync == 1 THEN CALL _TimeSync
     2585
    25262586    IF options.!autoload == 1 THEN CALL Menu_File_Load_Click
    25272587
     
    32713331        if VRMethod("CN_CONDET", "GetRecordAttr", srcRec, "Icon") = icons.!passive then ok = VRMethod( "CN_CONDET", "RemoveRecord", srcRec)
    32723332    end
     3333return
     3334
     3335/*:VRX         Menu_Selected_TimeSync_Click
     3336*/
     3337Menu_Selected_TimeSync_Click:
     3338    IF options.!debug == 1 THEN SAY time()' Menu_Selected_TimeSync_Click started'
     3339
     3340    ok = VRMethod( "CN_SMBTREE", "GetRecordList", "SourceOrSelected", "SelRH." )
     3341    if SelRH.0 = 0 then do
     3342        IF options.!debug == 1 THEN SAY time()' Menu_Selected_TimeSync_Click aborted'
     3343        return
     3344    end
     3345
     3346    call _GetSMBObjectProperties SelRH.1
     3347
     3348    options.!timesrv = SMBObj.resname
     3349    call _TimeSync
     3350
     3351    IF options.!debug == 1 THEN SAY time()' Menu_Selected_TimeSync_Click done'
    32733352return
    32743353
     
    34023481            CALL _Dynamic "ok = "fs.!prefix"RxDeleteMountPoint('"vfs.!mountpoint"')"
    34033482            IF options.!debug == 1 THEN SAY time()' '||'Remove "'vfs.!mountpoint'" = 'ok
     3483        end
     3484    end
     3485    else do
     3486        if options.!storecreds = 1 then do
     3487            ok = VRSet("EF_User",    "Value",options.!user)
     3488            ok = VRSet("EF_Password","Value",x2c(options.!spassword))
    34043489        end
    34053490    end
     
    44864571    end
    44874572
    4488     ok = _rpcsrvinfo(SMBObj.resname,credentials.!username,credentials.!password)
     4573    rpc_success = _rpcsrvinfo(SMBObj.resname,credentials.!username,credentials.!password)
    44894574
    44904575    Info.!nbname       = VRMethod( "CN_INFO", "AddRecord")
     
    44924577    Info.!domain       = VRMethod( "CN_INFO", "AddRecord")
    44934578    Info.!DMBLMB       = VRMethod( "CN_INFO", "AddRecord")
    4494     Info.!capabilities = VRMethod( "CN_INFO", "AddRecord")
     4579    if rpc_success = 1 then Info.!capabilities = VRMethod( "CN_INFO", "AddRecord")
    44954580    Info.!os           = VRMethod( "CN_INFO", "AddRecord")
    44964581    Info.!server       = VRMethod( "CN_INFO", "AddRecord")
    4497     Info.!version      = VRMethod( "CN_INFO", "AddRecord")
     4582    if rpc_success = 1 then Info.!version      = VRMethod( "CN_INFO", "AddRecord")
    44984583    Info.!status       = VRMethod( "CN_INFO", "AddRecord")
    44994584    Info.!IP           = VRMethod( "CN_INFO", "AddRecord")
    45004585    Info.!MAC          = VRMethod( "CN_INFO", "AddRecord")
    45014586
    4502     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, rpc.srvinfo.NETBIOSNAME)
    4503     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, rpc.srvinfo.SERVERSTRING)
     4587    if rpc_success = 1 then do
     4588        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, rpc.srvinfo.NETBIOSNAME)
     4589        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, rpc.srvinfo.SERVERSTRING)
     4590        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!capabilities, Info.TypeFH, strip(NLVGetMessage(138),'T',':'),Info.ValueFH, rpc.srvinfo.CAPABILITIES)
     4591        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!version,Info.TypeFH, strip(NLVGetMessage(139),'T',':'),Info.ValueFH, rpc.srvinfo.OS_VERSION)
     4592        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'),Info.ValueFH, rpc.srvinfo.LOGONSTATUS )
     4593    end
     4594    else do
     4595        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!nbname, Info.TypeFH, strip(NLVGetMessage(137),'T',':'),Info.ValueFH, SMBObj.resname)
     4596        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!comment,Info.TypeFH, strip(NLVGetMessage(125),'T',':'),Info.ValueFH, SMBObj.comment)
     4597        ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'), Info.ValueFH, SMBObj.udatamsg)
     4598    end
     4599
    45044600    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!domain, Info.TypeFH, strip(NLVGetMessage(21), 'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, WorkGroupFH ))
    45054601    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!os,     Info.TypeFH, strip(NLVGetMessage(93), 'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, OSFH  ))
    45064602    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!server, Info.TypeFH, strip(NLVGetMessage(19), 'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, VersionFH  ))
    4507     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!version,Info.TypeFH, strip(NLVGetMessage(139),'T',':'),Info.ValueFH, rpc.srvinfo.OS_VERSION)
    4508     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!capabilities, Info.TypeFH, strip(NLVGetMessage(138),'T',':'),Info.ValueFH, rpc.srvinfo.CAPABILITIES)
    45094603    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!DMBLMB, Info.TypeFH, strip(NLVGetMessage(124),'T',':'),Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, MBFH  ))
    45104604    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!IP,     Info.TypeFH, "IP"  ,Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, IPFH  ))
    45114605    ok = VRMethod( "CN_INFO", "SetFieldData", Info.!MAC,    Info.TypeFH, "MAC" ,Info.ValueFH, VRMethod("CN_SMBTREE", "GetFieldData", SMBObj.RH, MacFH ))
    45124606
    4513     ok = VRMethod( "CN_INFO", "SetFieldData", Info.!status, Info.TypeFH, strip(NLVGetMessage(67),'T',':'),Info.ValueFH, rpc.srvinfo.LOGONSTATUS ) /* SMBObj.udatamsg */
    45144607    IF options.!debug == 1 THEN SAY time()' SW_INFO_Create done'   
    45154608return
  • trunk/guitools/evfsgui/rc/lang/evfsi_de.mkm

    r665 r675  
    137137EVG0127I: LMHosts zurcksetzen
    138138EVG0128I: Anmeldeinformationen l”schen
    139 EVG0129?:
     139EVG0129I: Zeit synchronisieren
    140140;More advanced properties
    141141EVG0130I: Zeitablauf Cache
  • trunk/guitools/evfsgui/rc/lang/evfsi_en.mkm

    r665 r675  
    137137EVG0127I: ~Reset LMHosts
    138138EVG0128I: Rese~t stored credentials
    139 EVG0129?:
     139EVG0129I: Synchronize time
    140140;More advanced properties
    141141EVG0130I: sec. cache timeout
  • trunk/guitools/evfsgui/rc/lang/evfsi_fr.mkm

    r665 r675  
    143143EVG0127I: R‚initialiser LMHosts
    144144EVG0128I: A~nnuler utilisateur et mot de passe
    145 EVG0129?:
     145EVG0129I: Synchroniser l'heure
    146146;More advanced properties
    147147EVG0130I: D‚lai du cache
  • trunk/guitools/evfsgui/rc/lang/evfsi_it.mkm

    r665 r675  
    141141EVG0127I: Cancellare LMHosts
    142142EVG0128I: ~Disfare credenziali di memorizzare
    143 EVG0129?:
     143EVG0129I: Sincrinozzare l'ora
    144144;More advanced properties
    145145EVG0130I: Cache timeout
  • 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.