Recycle Bin optional feature

Eduardo Lima eduardoll at
Mon Feb 8 15:22:20 MST 2010

Hi Tridge,

Attached is the Recycle Bin source code that I've implemented so far. You
can get it from my remote repository:

To test and debug the implementation I'm using the attached rb.ldif file as
shown below:

bin/ldbmodify -H /home/eduardo/prefix.s4/private/sam.ldb rb.ldif

I have some questions:

1 - The execution always gets stuck when "rootdse_modify" returns TRUE. The
code responsible for this is a ldb_wait line in the function
ldb_do_autotransaction (ldbutil.c). I'm using dsdb_module_modify to modify
the objects and currently disabled the line that checks if the domain
functional level is satisfied.

I could not find out the reason that is causing this problem. Do you have
any idea?

2 - I tried to change the functional level during the provision but it
returns an error:

sudo ./setup/provision --domain=adr2
--host-name=lenovo --host-ip= --adminpass=passL3N0V03
--server-role="domain controller" --function-level="2008_R2"

File "./setup/provision", line 192, in <module>
    dom_for_fun_level = DS_DOMAIN_FUNCTION_2008_R2
NameError: name 'DS_DOMAIN_FUNCTION_2008_R2' is not defined

Is there another way to increase the functional level?

3 - I saw a commit
that may be related to this work I'm doing.


This flag corresponds to DRS_EXT_RECYCLE_BIN extended
flag in [MS-DRSR] documentation.

  [MS-DRSR] - 5.37
  If present, signifies that the DC has enabled
  the Recycle Binoptional feature.

Do I have to set this flag during the enable of recycle bin?

This code is only the first version, so some things may change. Now I'm
working on the insertion of the backlink attribute in the Recycle Bin
Feature object, but having this first part working will help me to debug the
rest of the code.

Thanks for the help!

Eduardo Lima
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb.ldif
Type: text/x-ldif
Size: 185 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-drs-recyclebin-enable-optional-feature-first-v.patch
Type: text/x-patch
Size: 11084 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list