diff options
author | Matthieu Patou <mat@matws.net> | 2012-10-29 22:12:33 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-01-22 00:12:17 +0100 |
commit | 0a4a4ba3f6b9748e3fccb546b284de565de2c8b5 (patch) | |
tree | c291e909cb1bf114aaf769a8341af963299c9f25 /source4 | |
parent | fa591a6d3cf9182b6d49621c83a6c3fbfeab1ee7 (diff) | |
download | samba-0a4a4ba3f6b9748e3fccb546b284de565de2c8b5.tar.gz samba-0a4a4ba3f6b9748e3fccb546b284de565de2c8b5.tar.bz2 samba-0a4a4ba3f6b9748e3fccb546b284de565de2c8b5.zip |
devel-script: add options for RODC and partial replica for replicate flags
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jan 22 00:12:17 CET 2013 on sn-devel-104
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/devel/getncchanges | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source4/scripting/devel/getncchanges b/source4/scripting/devel/getncchanges index eac4de6063..37ec18b224 100755 --- a/source4/scripting/devel/getncchanges +++ b/source4/scripting/devel/getncchanges @@ -101,9 +101,13 @@ if __name__ == "__main__": parser.add_option("", "--dn", dest="dn", help="DN to replicate",) parser.add_option("", "--exop", dest="exop", help="extended operation",) parser.add_option("", "--pas", dest="use_pas", action='store_true', default=False, - help="send partial attribute set",) + help="send partial attribute set (for RODC)") parser.add_option("", "--nb-iter", type='int', help="Number of getncchange iterations") parser.add_option("", "--dest-dsa", type='str', help="destination DSA GUID") + parser.add_option("", "--rodc", action='store_true', default=False, + help='use RODC replica flags') + parser.add_option("", "--partial-rw", action='store_true', default=False, + help='use RW partial replica flags, not be confused with --pas') parser.add_option("", "--replica-flags", type='int', default=drsuapi.DRSUAPI_DRS_INIT_SYNC | drsuapi.DRSUAPI_DRS_PER_SYNC | @@ -113,6 +117,19 @@ if __name__ == "__main__": help='replica flags') (opts, args) = parser.parse_args() + if opts.rodc: + opts.replica_flags = drsuapi.DRSUAPI_DRS_INIT_SYNC |\ + drsuapi.DRSUAPI_DRS_PER_SYNC |\ + drsuapi.DRSUAPI_DRS_GET_ANC |\ + drsuapi.DRSUAPI_DRS_NEVER_SYNCED |\ + drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING |\ + drsuapi.DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP + + if opts.partial_rw: + opts.replica_flags = drsuapi.DRSUAPI_DRS_INIT_SYNC |\ + drsuapi.DRSUAPI_DRS_PER_SYNC |\ + drsuapi.DRSUAPI_DRS_GET_ANC |\ + drsuapi.DRSUAPI_DRS_NEVER_SYNCED lp = sambaopts.get_loadparm() creds = credopts.get_credentials(lp) @@ -123,6 +140,9 @@ if __name__ == "__main__": if creds.is_anonymous(): parser.error("You must supply credentials") + if opts.partial_rw and opts.rodc: + parser.error("Can't specify --partial-rw and --rodc") + server = args[0] binding_str = "ncacn_ip_tcp:%s[seal,print]" % server |