[Samba] Disabling Machine Account password change

Florian Thiel thiel at medienzentrum-kassel.de
Fri Mar 19 09:48:48 GMT 2004


Gerald (Jerry) Carter schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Florian Thiel wrote:
> 
> | Ooops, my fault. I only read the last line and thought
> | you meant setting the clients is the best way to get rid
> | of the whole problem. In fact you spoke of testing. Sure!
> | Shame on me....
> 
> no problem.  Let me know kif it works though.  Would be
> good to know whether I should look at the including the
> patch in the main tree or just as a side item.

In Samba2 it does not compile.

Compiler output:

-------
Compiling rpc_server/srv_netlog_nt.c
Compiling rpc_server/srv_pipe_hnd.c
Compiling rpc_server/srv_reg.c
Compiling rpc_server/srv_reg_nt.c
rpc_server/srv_reg_nt.c: In function `_reg_info':
rpc_server/srv_reg_nt.c:143: `regvals' undeclared (first use in this
function)
rpc_server/srv_reg_nt.c:143: (Each undeclared identifier is reported only
once
rpc_server/srv_reg_nt.c:143: for each function it appears in.)
rpc_server/srv_reg_nt.c:145: `val' undeclared (first use in this function)
make: *** [rpc_server/srv_reg_nt.o] Error 1
-------


Code after patching:


"source/rpc_server/srv_reg_nt.c"
-----------------------
        if (!uni_key || !buf)
                return NT_STATUS_NO_MEMORY;

        if ( strequal(name, "RefusePasswordChange") ) {
                uint32 dwValue = 0x1;

                regval_ctr_addvalue(&regvals, "RefusePasswordChange", REG_DWORD,
                        (const char*)&dwValue, sizeof(dwValue));
                val = dup_registry_value( regval_ctr_specific_value( &regvals, 0 ) );

                status = NT_STATUS_OK;

                goto out;
        }

-----------------------

Does that help?

-- 
Florian Thiel - Medienzentrum Kassel
Systembetreuung Internet- und Kommunikationstechnik
Kasseler Schulen am Netz - http://www.medienzentrum-kassel.de


More information about the samba mailing list