mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
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
This commit is contained in:
parent
fa591a6d3c
commit
0a4a4ba3f6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user