d = g.split(';')
if len(d) != 2 or not d[0].startswith("[LDAP://"):
raise RuntimeError("Badly formed gPLink '%s'" % g)
- ret.append({ 'dn' : d[0][8:], 'options' : int(d[1])})
+ ret.append({'dn' : d[0][8:], 'options' : int(d[1])})
return ret
def copy_directory_remote_to_local(conn, remotedir, localdir):
if not os.path.isdir(localdir):
os.mkdir(localdir)
- r_dirs = [ remotedir ]
- l_dirs = [ localdir ]
+ r_dirs = [remotedir ]
+ l_dirs = [localdir ]
while r_dirs:
r_dir = r_dirs.pop()
l_dir = l_dirs.pop()
ignore_existing=False):
if not conn.chkpath(remotedir):
conn.mkdir(remotedir)
- l_dirs = [ localdir ]
- r_dirs = [ remotedir ]
+ l_dirs = [localdir ]
+ r_dirs = [remotedir ]
while l_dirs:
l_dir = l_dirs.pop()
r_dir = r_dirs.pop()
except Exception:
raise CommandError("Failed to find objectClass for user %s" % username)
- session_info_flags = ( AUTH_SESSION_INFO_DEFAULT_GROUPS |
+ session_info_flags = (AUTH_SESSION_INFO_DEFAULT_GROUPS |
AUTH_SESSION_INFO_AUTHENTICATED )
# When connecting to a remote server, don't look up the local privilege DB
if found:
raise CommandError("GPO '%s' already linked to this container" % gpo)
else:
- gplist.insert(0, { 'dn' : gpo_dn, 'options' : gplink_options })
+ gplist.insert(0, {'dn' : gpo_dn, 'options' : gplink_options })
else:
gplist = []
- gplist.append({ 'dn' : gpo_dn, 'options' : gplink_options })
+ gplist.append({'dn' : gpo_dn, 'options' : gplink_options })
gplink_str = encode_gplink(gplist)
"credopts": options.CredentialsOptions,
}
- takes_args = [ 'container_dn', 'inherit_state' ]
+ takes_args = ['container_dn', 'inherit_state' ]
takes_options = [
Option("-H", help="LDB URL for database or target server", type=str)
self.samdb.add(m)
# Get new security descriptor
- ds_sd_flags = ( security.SECINFO_OWNER |
+ ds_sd_flags = (security.SECINFO_OWNER |
security.SECINFO_GROUP |
security.SECINFO_DACL )
msg = get_gpo_info(self.samdb, gpo=gpo, sd_flags=ds_sd_flags)[0]
create_directory_hier(conn, sharepath)
# Set ACL
- sio = ( security.SECINFO_OWNER |
+ sio = (security.SECINFO_OWNER |
security.SECINFO_GROUP |
security.SECINFO_DACL |
security.SECINFO_PROTECTED_DACL )