Changeset 675 for trunk/guitools/shared
- Timestamp:
- Jan 1, 2012, 4:47:09 PM (14 years ago)
- Location:
- trunk/guitools/shared
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/guitools/shared/cltinit.vrs
r660 r675 61 61 if exist.0 = 1 then samba.!smbclientexe = exist.1 62 62 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 63 69 if samba.!smbclientexe = "" then do /* in parent directory? */ 64 70 call charout , " Are binaries in parent directory? " … … 142 148 ok = SysMkDir(unixetc) 143 149 ok = SysMkDir(etc'\samba') 150 ok = SysMkDir(etc'\samba\pid') 144 151 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) 145 155 146 156 /* Messages from Samba will go here */ -
trunk/guitools/shared/rxrpclib.vrs
r665 r675 27 27 28 28 count = 0 29 SIGNAL ON SYNTAX NAME RPCERROR 29 30 do until lines(samba.!msg) = 0 30 31 rpcline = linein(samba.!msg) … … 50 51 51 52 end 53 SIGNAL OFF SYNTAX 52 54 ok = stream(samba.!msg,'c','close') 53 55 ok = SysFileDelete(samba.!msg) … … 81 83 82 84 count = 0 85 SIGNAL ON SYNTAX NAME RPCERROR 83 86 do until lines(samba.!msg) = 0 84 87 rpcline = linein(samba.!msg) … … 104 107 105 108 end 109 SIGNAL OFF SYNTAX 106 110 ok = stream(samba.!msg,'c','close') 107 111 ok = SysFileDelete(samba.!msg) … … 137 141 138 142 count = 0 143 SIGNAL ON SYNTAX NAME RPCERROR 139 144 do until lines(samba.!msg) = 0 140 145 rpcline = linein(samba.!msg) … … 155 160 end 156 161 end 162 SIGNAL OFF SYNTAX 157 163 ok = stream(samba.!msg,'c','close') 158 164 ok = SysFileDelete(samba.!msg) … … 185 191 186 192 count = 0 193 SIGNAL ON SYNTAX NAME RPCERROR 187 194 do until lines(samba.!msg) = 0 188 195 rpcline = linein(samba.!msg) … … 203 210 end 204 211 end 212 SIGNAL OFF SYNTAX 205 213 ok = stream(samba.!msg,'c','close') 206 214 ok = SysFileDelete(samba.!msg) … … 233 241 234 242 Failure = 0 235 243 SIGNAL ON SYNTAX NAME RPCERROR 236 244 do until lines(samba.!msg) = 0 237 245 rpcline = linein(samba.!msg) … … 255 263 end 256 264 end 265 SIGNAL OFF SYNTAX 257 266 ok = stream(samba.!msg,'c','close') 258 267 ok = SysFileDelete(samba.!msg) … … 286 295 287 296 count = 0 297 SIGNAL ON SYNTAX NAME RPCERROR 288 298 do until lines(samba.!msg) = 0 289 299 rpcline = linein(samba.!msg) … … 309 319 310 320 end 321 SIGNAL OFF SYNTAX 311 322 ok = stream(samba.!msg,'c','close') 312 323 ok = SysFileDelete(samba.!msg) … … 338 349 339 350 Failure = 0 340 351 SIGNAL ON SYNTAX NAME RPCERROR 341 352 do until lines(samba.!msg) = 0 342 353 rpcline = linein(samba.!msg) … … 363 374 end 364 375 end 376 SIGNAL OFF SYNTAX 365 377 ok = stream(samba.!msg,'c','close') 366 378 ok = SysFileDelete(samba.!msg) … … 387 399 if UserCred = 'USERCRED' | UserCred = '' | UserCred = '--user=%' then UserCred = '-N' 388 400 389 say ' 'samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' >'samba.!msg390 address cmd samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' >'samba.!msg401 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 391 403 392 404 rpc.srvinfo. = "" 393 405 394 406 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 396 423 do until lines(samba.!msg) = 0 397 424 rpcline = linein(samba.!msg) … … 414 441 rpc.srvinfo.SERVERSTRING = strip(rpc.srvinfo.SERVERSTRING) 415 442 say ' rpc.srvinfo.NETBIOSNAME = "'rpc.srvinfo.NETBIOSNAME'"' 443 say ' rpc.srvinfo.SERVERSTRING = "'rpc.srvinfo.SERVERSTRING'"' 416 444 rpc.srvinfo.CAPABILITIES = "" 417 445 do I = 1 to words(rpc.srvinfo.SERVERSTRING) 446 say "Word "I":"word(rpc.srvinfo.SERVERSTRING,I) 418 447 if length(word(rpc.srvinfo.SERVERSTRING,I)) >=4 then leave 419 448 if length(word(rpc.srvinfo.SERVERSTRING,I)) = 2 | length(word(rpc.srvinfo.SERVERSTRING,I)) = 3 then do … … 421 450 end 422 451 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 425 456 say ' rpc.srvinfo.CAPABILITIES = "'rpc.srvinfo.CAPABILITIES'"' 426 457 say ' rpc.srvinfo.SERVERSTRING = "'rpc.srvinfo.SERVERSTRING'"' 427 458 end 428 end 459 end 460 SIGNAL OFF SYNTAX 461 429 462 ok = stream(samba.!msg,'c','close') 430 463 ok = SysFileDelete(samba.!msg) … … 436 469 else do 437 470 retval = 0 471 rpc.srvinfo. = "" 438 472 rpc.srvinfo.LOGONSTATUS=substr(rpcline,pos("NT_STATUS",rpcline),) 439 473 end … … 441 475 IF options.!debug == 1 THEN SAY time()" _rpcsrvinfo() done, "retval 442 476 return retval 477 478 RPCERROR: 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 484 return retval -
trunk/guitools/shared/sambainit.vrs
r638 r675 72 72 if exist.0 = 1 then samba.!smbd = exist.1 73 73 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 74 80 if samba.!smbd = "" then do /* in parent directory? */ 75 81 call charout , " Are binaries in parent directory? " … … 234 240 ok = SysMkDir(etc'\samba\spool') 235 241 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) 236 245 237 246 /* use temporary smbpasswd created by pdbedit */
Note:
See TracChangeset
for help on using the changeset viewer.