Samba WINS server killing NMBD process : a trick

COLLOT Jean-Yves Jean-Yves.COLLOT at cofiroute.fr
Wed Aug 7 12:03:18 GMT 2002


This is very surprising, because I did exactly the same thing here, and it
exited like you, but went on OK with my DEBUG hacking. May be my NMBD.EXE
file is not exactly the same as yours, but I doubt it, because the address
of the modified instruction is the same.

I guess there is another reason now for exiting. Could be some NMBD.PID file
in the [VAR.LOCKS] area. Please check in the NMB.LOG (or NMBD.LOG, I don't
remember) which is somewhere in the SAMBA_ROOT:[VAR] directory if it
displays the reason why it exited this time, and delete this NMBD.PID file
if any, before retrying the DEBUG stuff.
 
Note that now that you have the address of the instruction, you can skip the
EXAMINE commands, and directly type :

DBG> DEP 43A58 = 47FF0410
DBG> GO
DBG> GO

If it goes on exiting (which I doubt, but who knows ?), could you try this :

- Delete the WINS.DAT file that should be in the SAMBA_ROOT:[VAR.LOCKS]
directory,

- Start NBMD from your terminal like this :

$ MC SAMBA_ROOT:[BIN]NMBD -d 5 -l TT:

You'll have a lot of messages (the log is redirected to your terminal)
After 2 or 3 seconds, send an interrupt (CTRL_Y), and then type

$ DEBUG

Do the DEBUG DEPOSIT command given above , then "GO"

You'll see a lot more messages. If it exits again, we'll know exactly what
it did before exiting.

Hope this will help.


-----Message d'origine-----
De: MDDIKPSDNWMD at spammotel.com
A: Jean-Yves.COLLOT at cofiroute.fr
Cc: 'samba-vms at lists.samba.org'
Date: 07/08/2002 3:24 AM
Objet: Re: RE: Samba WINS server killing NMBD process : a trick

COLLOT Jean-Yves wrote:

> Hi.
>
> I understand that rebuilding SAMBA 2.0.6 from scratch is not so easy.
>
> If you are interested in doing something a little tricky, you may be 
> able to check if my hypothesis is good.
> The idea is to run NMBD interactively, and cleverly change the call 
> argument from "True" to "False" by modifying the right instruction 
> directly in the EXE file, just before actually running it.
>
> OK, that's quite easy :
>
If you say so!    :-)

> $ DEFINE DBG$PROCESS NONE
> $ RUN/DEBUG SAMBA_ROOT:[BIN]NMBD
> DBG>SET SCOPE NMBD_WINSSERVER
> DBG>SET RAD HEX
> DBG>E/INST %LINE 36680
>         (Here, you should see :  BIS  R31,#X01,R16)
> DBG>EVAL/ADDR %LINE 36680
>         (Here, you'll have some hexadecimal value, like 
> 0000000000xxxxx. Use it in the following:)
> DBG>DEP 0000000000xxxx = 47FF0410
> DBG>E/INST %LINE 36680
>         (Now, you should have BIS R31,R31,R16)
> DBG>GO
> ....
> DBG>GO
>
> As you see, we have changed the call argument from 1 to 0 (you'll have

> to believe me when I say that's what we've done...)
>
OK.  I'm game.

> If NMBD works OK now and does not exit, you'll have to find out how to

> rebuild NMBD from sources in order to make the change permanent...
>  
>
Seems to have exited as before, I'm afraid.


$ RUN/DEBUG SAMBA_ROOT:[BIN]NMBD.EXE_AXP
 
         OpenVMS Alpha Debug64 Version V7.2-019
 
%DEBUG-I-INITIAL, Language: C, Module: NMBD
%DEBUG-I-NOTATMAIN, Type GO to reach MAIN program
 
DBG> SET SCOPE NMBD_WINSSERVER
DBG> SET RAD HEX
DBG> E/INST %LINE 36680
NMBD_WINSSERVER\initiate_wins_processing\%LINE 36680:           BIS
R31,#X01,R16
DBG> EVAL/ADDR %LINE 36680
0000000000043A58
DBG> DEP 0000000000043A58 = 47FF0410
DBG> E/INST %LINE 36680
NMBD_WINSSERVER\initiate_wins_processing\%LINE 36680:           BIS
R31,R31,R16
DBG> GO
break at NMBD\main\%LINE 35732+44
DBG> GO
%DEBUG-I-EXITSTATUS, is '%SYSTEM-S-NORMAL, normal successful completion'
DBG> GO
%DEBUG-E-BADSTARTPC, cannot start from PC 0000000000000000
DBG> GO
%DEBUG-E-BADSTARTPC, cannot start from PC 0000000000000000
DBG>

Merci beaucoup, Jean-Yves.  What do you think?

Alder

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-vms mailing list