self.apply_colour_choice(kwargs.pop('color', 'auto'))
# Check for a min a max number of allowed arguments, whenever possible
- # The suffix "?" means zero or one occurence
- # The suffix "+" means at least one occurence
- # The suffix "*" means zero or more occurences
+ # The suffix "?" means zero or one occurrence
+ # The suffix "+" means at least one occurrence
+ # The suffix "*" means zero or more occurrences
min_args = 0
max_args = 0
undetermined_max_args = False
def is_printable_attr_val(val):
import unicodedata
- # The value must be convertable to a string value.
+ # The value must be convertible to a string value.
try:
str_val = str(val)
except:
dns_conn = DnsConnWrapper(server, lp, creds)
- then various common errors (for example, mispelled zones) on
+ then various common errors (for example, misspelled zones) on
common operations will raise CommandErrors that turn into
relatively nice messages (when compared to tracebacks).
# Updates the CN=<domain>,CN=Partitions,CN=Configuration,... object to
# reflect the domain rename
def rename_domain_partition(self, logger, samdb, new_netbios_name):
- '''Renames the domain parition object and updates its nETBIOSName'''
+ '''Renames the domain partition object and updates its nETBIOSName'''
# lookup the crossRef object that holds the nETBIOSName (nCName has
# already been updated by this point, but the netBIOS hasn't)
metavar="[yes|no|auto]",
help="Define if we should use the native fs capabilities or a tdb file for "
"storing attributes likes ntacl when --use-ntvfs is set. "
- "auto tries to make an inteligent guess based on the user rights and system capabilities",
+ "auto tries to make an intelligent guess based on the user rights and system capabilities",
default="auto")
]
if samba.is_ntvfs_fileserver_built():
metavar="[yes|no|auto]",
help="Define if we should use the native fs capabilities or a tdb file for "
"storing attributes likes ntacl when --use-ntvfs is set. "
- "auto tries to make an inteligent guess based on the user rights and system capabilities",
+ "auto tries to make an intelligent guess based on the user rights and system capabilities",
default="auto")
]
if adprep_level is None:
# Select the adprep_level default based
- # on what the base schema premits
+ # on what the base schema permits
if base_schema in ["2008_R2", "2008_R2_old"]:
# without explicit --adprep-level=2008_R2
# we will skip the adprep step on
if remote_lsa_info.sid != local_tdo_info.sid or \
remote_lsa_info.name.string != local_tdo_info.netbios_name.string or \
remote_lsa_info.dns_domain.string != local_tdo_info.domain_name.string:
- raise CommandError("LocalTDO inconsistend: Netbios[%s] DNS[%s] SID[%s]" % (
+ raise CommandError("LocalTDO inconsistent: Netbios[%s] DNS[%s] SID[%s]" % (
local_tdo_info.netbios_name.string,
local_tdo_info.domain_name.string,
local_tdo_info.sid))
if local_lsa_info.sid != remote_tdo_info.sid or \
local_lsa_info.name.string != remote_tdo_info.netbios_name.string or \
local_lsa_info.dns_domain.string != remote_tdo_info.domain_name.string:
- raise CommandError("RemoteTDO inconsistend: Netbios[%s] DNS[%s] SID[%s]" % (
+ raise CommandError("RemoteTDO inconsistent: Netbios[%s] DNS[%s] SID[%s]" % (
remote_tdo_info.netbios_name.string,
remote_tdo_info.domain_name.string,
remote_tdo_info.sid))
"from this server"),
dest='format', action='store_const', const='summary'),
Option("--pull-summary", help=("Have we successfully replicated "
- "from all relevent servers?"),
+ "from all relevant servers?"),
dest='format', action='store_const', const='pull_summary'),
Option("--notify-summary", action='store_const',
const='notify_summary', dest='format',
- help=("Have we successfully notified all relevent servers of "
+ help=("Have we successfully notified all relevant servers of "
"local changes, and did they say they successfully "
"replicated?")),
Option("--classic", help="print local replication details",
class cmd_remove_symlink(GPOCommand):
"""Removes a VGP Symbolic Link Group Policy from the sysvol
-This command removes a symlink setting from the sysvol from appling to winbind clients.
+This command removes a symlink setting from the sysvol from applying to winbind
+clients.
Example:
samba-tool gpo manage symlink remove {31B2F340-016D-11D2-945F-00C04FB984F9} /tmp/source /tmp/target
self.dacl_list.sort()
def extract_dacl(self):
- """ Extracts the DACL as a list of ACE string (with the brakets).
+ """ Extracts the DACL as a list of ACE string (with the brackets).
"""
try:
if "S:" in self.sddl:
Option("-v", "--verbose", dest="verbose", action="store_true", default=False,
help="Print all DN pairs that have been compared"),
Option("--sd", dest="descriptor", action="store_true", default=False,
- help="Compare nTSecurityDescriptor attibutes only"),
+ help="Compare nTSecurityDescriptor attributes only"),
Option("--sort-aces", dest="sort_aces", action="store_true", default=False,
help="Sort ACEs before comparison of nTSecurityDescriptor attribute"),
Option("--view", dest="view", default="section", choices=["section", "collision"],
Option("--scope", dest="scope", default="SUB", choices=["SUB", "ONE", "BASE"],
help="Pass search scope that builds DN list. Options: SUB, ONE, BASE"),
Option("--filter", dest="filter", default="",
- help="List of comma separated attributes to ignore in the comparision"),
+ help="List of comma separated attributes to ignore in the comparison"),
Option("--skip-missing-dn", dest="skip_missing_dn", action="store_true", default=False,
help="Skip report and failure due to missing DNs in one server or another"),
]
except Exception as e:
raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e))
- minchilds = 0
+ minchildren = 0
scope = ldb.SCOPE_ONELEVEL
if recursive:
- minchilds = 1
+ minchildren = 1
scope = ldb.SCOPE_SUBTREE
try:
- childs = samdb.search(base=full_ou_dn,
- expression="(objectclass=*)",
- scope=scope, attrs=[])
- if len(childs) <= minchilds:
+ children = samdb.search(base=full_ou_dn,
+ expression="(objectclass=*)",
+ scope=scope, attrs=[])
+ if len(children) <= minchildren:
self.outf.write('ou "%s" is empty\n' % ou_dn)
return
- for child in sorted(childs, key=attrgetter('dn')):
+ for child in sorted(children, key=attrgetter('dn')):
if child.dn == full_ou_dn:
continue
if not full_dn:
substring queries.
fSUBTREEATTINDEX: create a browsing index for this attribute. VLV searches
require this.
- fCONFIDENTIAL: indicate that the attribute is confidental and requires
+ fCONFIDENTIAL: indicate that the attribute is confidential and requires
special access checks.
fNEVERVALUEAUDIT: indicate that changes to this value should NOT be audited.
fRODCFILTEREDATTRIBUTE: indicate that this value should not be replicated to
def update_pid(pid):
if self.lockfd != -1:
got_exclusive = False
- # Try 5 times to get the exclusiv lock.
+ # Try 5 times to get the exclusive lock.
for i in range(0, 5):
try:
fcntl.lockf(self.lockfd, fcntl.LOCK_EX | fcntl.LOCK_NB)
for msg in notify_handle:
if not isinstance(msg, ldb.Message):
- self.outf.write("referal: %s\n" % msg)
+ self.outf.write("referral: %s\n" % msg)
continue
created = msg.get("uSNCreated")[0]
changed = msg.get("uSNChanged")[0]
log_msg("No process running.\n")
return
if not conflict:
- log_msg("Proccess %d is not running anymore.\n" % (
+ log_msg("Process %d is not running anymore.\n" % (
self.current_pid))
update_pid(None)
return
- log_msg("Sending SIGTERM to proccess %d.\n" % (
+ log_msg("Sending SIGTERM to process %d.\n" % (
self.current_pid))
os.kill(self.current_pid, signal.SIGTERM)
return
def calc_distance_color_scheme(self, color_scheme, output):
"""Heuristics to work out the colour scheme for distance matrices.
- Returning None means no colour, otherwise it sould be a colour
+ Returning None means no colour, otherwise it should be a colour
from graph.COLOUR_SETS"""
if color_scheme is not None:
# --color-scheme implies --color=yes for *this* purpose.