rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
group_home_acl = self.BuildGroupACL(gid) group_home_acl['path'] = group_home
group_home_acl = self.BuildGroupACL(gid) group_home_acl['path'] = group_home
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
if os.path.exists(group_home) and os.path.isdir(os.path.realpath(group_home)):
if os.path.exists(group_home) \ and os.path.isdir(os.path.realpath(group_home)):
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("Checking shared group dir %s..." % \
logging.progress("Checking shared group dir %s..." %
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.warning("Shared group dir %s is missing, please repair this first." \ % styles.stylize(styles.ST_PATH, group_home))
logging.warning( "Shared group dir %s is missing, please repair this first." % styles.stylize(styles.ST_PATH, group_home))
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
"Checking %s symlinks in members homes, this can take a while..." \ % styles.stylize(styles.ST_NAME, group))
"Checking %s symlinks in members homes, this can be long…" % styles.stylize(styles.ST_NAME, group))
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
"""Check the groups, the cache. If not system, check the shared dir, the resps/guests, the members symlinks."""
""" Check the groups, the cache. If not system, check the shared dir, the resps/guests, the members symlinks."""
def CheckGroups(self, groups_to_check = [], minimal=True, batch=False, auto_answer=None, force=False): """Check the groups, the cache. If not system, check the shared dir, the resps/guests, the members symlinks."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
GroupsController.configuration.CheckBaseDirs(minimal, batch, auto_answer)
GroupsController.configuration.CheckBaseDirs( minimal, batch, auto_answer)
def CheckGroups(self, groups_to_check = [], minimal=True, batch=False, auto_answer=None, force=False): """Check the groups, the cache. If not system, check the shared dir, the resps/guests, the members symlinks."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornCheckError("Some group(s) check(s) didn't pass, or weren't corrected.")
raise exceptions.LicornCheckError( "Some group(s) check(s) didn't pass, or weren't corrected.")
def _chk(group): return self.__check_group(group, minimal=minimal, batch=batch, auto_answer=auto_answer, force=force)
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
"""For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to the old group name if it is set."""
""" For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to the old group name if it is set. """
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
link_basename = GroupsController.groups[gid]['name'].replace(strip_prefix, '', 1)
link_basename = \ GroupsController.groups[gid]['name'].replace(strip_prefix, '', 1)
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.info("Deleted symlink %s." % \
logging.info("Deleted symlink %s." %
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
"Unable to delete symlink %s (was: %s)." \ % (styles.stylize(styles.ST_LINK, link), str(e)) )
"Unable to delete symlink %s (was: %s)." % ( styles.stylize(styles.ST_LINK, link), str(e)))
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
if e.errno == 2 and link_src_old and link_src_old == os.readlink(link):
if e.errno == 2 and link_src_old \ and link_src_old == os.readlink(link):
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.info("Deleted old symlink %s." % styles.stylize(styles.ST_LINK, link) )
logging.info("Deleted old symlink %s." % styles.stylize(styles.ST_LINK, link))
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornRuntimeError("Unable to read symlink %s (error was: %s)." % (link, str(e)) )
raise exceptions.LicornRuntimeError( "Unable to read symlink %s (error was: %s)." % ( link, str(e)))
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
warn_message = logging.SYSG_USER_LACKS_SYMLINK % (styles.stylize(styles.ST_LOGIN, user), styles.stylize(styles.ST_NAME, link_basename))
warn_message = logging.SYSG_USER_LACKS_SYMLINK % ( styles.stylize(styles.ST_LOGIN, user), styles.stylize(styles.ST_NAME, link_basename))
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
fsapi.make_symlink(link_src, link_dst, batch = batch, auto_answer = auto_answer)
fsapi.make_symlink(link_src, link_dst, batch=batch, auto_answer=auto_answer)
def CheckGroupSymlinks(self, gid=None, group=None, oldname=None, delete=False, strip_prefix=None, batch=False, auto_answer=None): """For each member of a group, verify member has a symlink to the shared group dir inside his home (or under level 2 directory). If not, create the link. Eventually delete links pointing to ...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
""" Set permissive or not permissive the shared directory of the group 'name'. """
""" Set permissive or not permissive the shared directory of the group 'name'. """
def SetSharedDirPermissiveness(self, name=None, permissive=True): """ Set permissive or not permissive the shared directory of the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def SetSharedDirPermissiveness(self, name=None, permissive=True): """ Set permissive or not permissive the shared directory of the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
self.CheckGroups( [ name ], batch=True)
self.CheckGroups([ name ], batch=True)
def SetSharedDirPermissiveness(self, name=None, permissive=True): """ Set permissive or not permissive the shared directory of the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("Group %s is already%s permissive." % (styles.stylize(styles.ST_NAME, name), qualif) )
logging.info("Group %s is already%s permissive." % ( styles.stylize(styles.ST_NAME, name), qualif) )
def SetSharedDirPermissiveness(self, name=None, permissive=True): """ Set permissive or not permissive the shared directory of the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.BadArgumentError, "You must specify a group name or a GID."
raise exceptions.BadArgumentError( "You must specify a group name or a GID.")
def is_permissive(self, name = None, gid = None): """ Return True if the shared dir of the group is permissive."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
home = '%s/%s/%s' % (GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], name)
home = '%s/%s/%s' % ( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], name)
def is_permissive(self, name = None, gid = None): """ Return True if the shared dir of the group is permissive."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def is_permissive(self, name = None, gid = None): """ Return True if the shared dir of the group is permissive."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.warning('''Shared dir %s doesn't exist, please run "licorn-check group --name %s" to fix.''' % (styles.stylize(styles.ST_PATH, home), styles.stylize(styles.ST_NAME, name)), once = True)
logging.warning('''Shared dir %s doesn't exist, please ''' '''run "licorn-check group --name %s" to fix.''' % ( styles.stylize(styles.ST_PATH, home), styles.stylize(styles.ST_NAME, name)), once=True)
def is_permissive(self, name = None, gid = None): """ Return True if the shared dir of the group is permissive."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornIOError("IO error on %s (was: %s)." % (home, e))
raise exceptions.LicornIOError("IO error on %s (was: %s)." % (home, e))
def is_permissive(self, name = None, gid = None): """ Return True if the shared dir of the group is permissive."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.warning(logging.MODULE_POSIX1E_IMPORT_ERROR % e, once = True)
logging.warning(logging.MODULE_POSIX1E_IMPORT_ERROR % e, once=True)
def is_permissive(self, name = None, gid = None): """ Return True if the shared dir of the group is permissive."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def group_exists(name = None, gid = None):
def group_exists(name=None, gid=None):
def group_exists(name = None, gid = None): """Return true if the group or gid exists on the system. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.BadArgumentError("You must specify a GID or a name to test existence of.")
raise exceptions.BadArgumentError( "You must specify a GID or a name to test existence of.")
def group_exists(name = None, gid = None): """Return true if the group or gid exists on the system. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
"""Return all members of a group, which are not members of this group in their primary group."""
""" Return all members of a group, which are not members of this group in their primary group."""
def auxilliary_members(name): """Return all members of a group, which are not members of this group in their primary group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
return GroupsController.groups[GroupsController.name_to_gid(name)]['memberUid']
return GroupsController.groups[ GroupsController.name_to_gid(name)]['memberUid']
def auxilliary_members(name): """Return all members of a group, which are not members of this group in their primary group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
return GroupsController.primary_members(name).union(GroupsController.auxilliary_members(name))
return GroupsController.primary_members(name).union( GroupsController.auxilliary_members(name))
def all_members(name): """Return all members of a given group name."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
return gid < GroupsController.configuration.groups.gid_min or gid > GroupsController.configuration.groups.gid_max
return gid < GroupsController.configuration.groups.gid_min \ or gid > GroupsController.configuration.groups.gid_max
def is_system_gid(gid): """ Return true if gid is system. """ return gid < GroupsController.configuration.groups.gid_min or gid > GroupsController.configuration.groups.gid_max
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.debug2("filtering %d against %d and %d." % (gid, GroupsController.configuration.groups.gid_min, GroupsController.configuration.groups.gid_max)) return gid >= GroupsController.configuration.groups.gid_min and gid <= GroupsController.configuration.groups.gid_max
return gid >= GroupsController.configuration.groups.gid_min \ and gid <= GroupsController.configuration.groups.gid_max
def is_standard_gid(gid): """ Return true if gid is system. """ logging.debug2("filtering %d against %d and %d." % (gid, GroupsController.configuration.groups.gid_min, GroupsController.configuration.groups.gid_max)) return gid >= GroupsController.configuration.groups.gid_min and gid <= GroupsController.configuration.g...
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
return GroupsController.is_system_gid(GroupsController.name_to_gid(name))
return GroupsController.is_system_gid( GroupsController.name_to_gid(name))
def is_system_group(name): """ Return true if group is system. """ try: return GroupsController.is_system_gid(GroupsController.name_to_gid(name)) except KeyError: raise exceptions.LicornRuntimeException, "The group %s doesn't exist." % name
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornRuntimeException, "The group %s doesn't exist." % name
raise exceptions.LicornRuntimeException( "The group '%s' doesn't exist." % name)
def is_system_group(name): """ Return true if group is system. """ try: return GroupsController.is_system_gid(GroupsController.name_to_gid(name)) except KeyError: raise exceptions.LicornRuntimeException, "The group %s doesn't exist." % name
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
return GroupsController.is_standard_gid(GroupsController.name_to_gid(name))
return GroupsController.is_standard_gid( GroupsController.name_to_gid(name))
def is_standard_group(name): """ Return true if group is system. """ try: return GroupsController.is_standard_gid(GroupsController.name_to_gid(name)) except KeyError: raise exceptions.LicornRuntimeException, "The group `%s' doesn't exist." % name
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornRuntimeException, "The group `%s' doesn't exist." % name
raise exceptions.LicornRuntimeException( "The group '%s' doesn't exist." % name)
def is_standard_group(name): """ Return true if group is system. """ try: return GroupsController.is_standard_gid(GroupsController.name_to_gid(name)) except KeyError: raise exceptions.LicornRuntimeException, "The group `%s' doesn't exist." % name
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
return GroupsController.is_empty_gid(GroupsController.name_to_gid(name))
return GroupsController.is_empty_gid( GroupsController.name_to_gid(name))
def is_empty_group(name): try: return GroupsController.is_empty_gid(GroupsController.name_to_gid(name)) except KeyError: raise exceptions.LicornRuntimeException, "The group `%s' doesn't exist." % name
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornRuntimeException, "The group `%s' doesn't exist." % name
raise exceptions.LicornRuntimeException( "The group '%s' doesn't exist." % name)
def is_empty_group(name): try: return GroupsController.is_empty_gid(GroupsController.name_to_gid(name)) except KeyError: raise exceptions.LicornRuntimeException, "The group `%s' doesn't exist." % name
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornRuntimeError('''Can't build a valid UNIX group name (got %s, which doesn't verify %s) with the string you provided "%s".''' % (groupname, hlstr.regex['group_name'], inputname) )
raise exceptions.LicornRuntimeError( '''Can't build a valid UNIX group name (got %s, ''' '''which doesn't verify %s) with the string you ''' '''provided "%s".''' % ( groupname, hlstr.regex['group_name'], inputname) )
def make_name(inputname): """ Make a valid login from user's firstname and lastname."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
members = groups.all_members(name)
members = list(groups.all_members(name))
def view(uri, http_user, name): """Prepare a group view to be printed.""" users.reload() groups.reload() title = _("Details of group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title) u = users.users g = groups.groups # TODO: should we forbid system group view ? why not ? # As of now, this is har...
1f04a4fc30ab0f9646c851ccb0f79e2bc831824d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1f04a4fc30ab0f9646c851ccb0f79e2bc831824d/groups.py
resps = groups.all_members(configuration.groups.resp_prefix + name)
resps = list( groups.all_members(configuration.groups.resp_prefix + name))
def user_line(login): uid = users.login_to_uid(login) return '''<tr> <td>%s</td> <td>%s</td> <td>%s</td> </tr>''' % ( u[uid]['gecos'], login, uid )
1f04a4fc30ab0f9646c851ccb0f79e2bc831824d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1f04a4fc30ab0f9646c851ccb0f79e2bc831824d/groups.py
guests = \ groups.all_members(configuration.groups.guest_prefix + name)
guests = list( groups.all_members(configuration.groups.guest_prefix + name))
def user_line(login): uid = users.login_to_uid(login) return '''<tr> <td>%s</td> <td>%s</td> <td>%s</td> </tr>''' % ( u[uid]['gecos'], login, uid )
1f04a4fc30ab0f9646c851ccb0f79e2bc831824d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1f04a4fc30ab0f9646c851ccb0f79e2bc831824d/groups.py
dest = g[groups.name_to_gid(gname)]['memberUid'][:]
dest = list(g[groups.name_to_gid(gname)]['memberUid'])
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ...
1f04a4fc30ab0f9646c851ccb0f79e2bc831824d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1f04a4fc30ab0f9646c851ccb0f79e2bc831824d/groups.py
dest = g[groups.name_to_gid(gname)]['members'][:]
dest = g[groups.name_to_gid(gname)]['memberUid'][:]
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ...
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
for current in g[groups.name_to_gid(gname)]['members']:
for current in g[groups.name_to_gid(gname)]['memberUid']:
def edit(uri, http_user, name): """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = _("Editing group %s") % name data = w.page_body_start(uri, http_user, ctxtnav, title, False) try: group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists ...
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
skel(group['skel'], sys),
skel(group['groupSkel'], sys),
def permissive(perm, system):
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
'skel' : group['skel'] + name,
'skel' : group['groupSkel'] + name,
def main(uri, http_user, sort = "name", order = "asc"): """List all groups and provileges on the system, displaying them in a nice HTML page. """ start = time.time() users.reload() groups.reload() #profiles.reload() g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = _('Group...
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
tgroups[gid]['members'] = [] for member in groups.groups[gid]['members']:
tgroups[gid]['memberUid'] = [] for member in groups.groups[gid]['memberUid']:
def main(uri, http_user, sort = "name", order = "asc"): """List all groups and provileges on the system, displaying them in a nice HTML page. """ start = time.time() users.reload() groups.reload() #profiles.reload() g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = _('Group...
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
tgroups[gid]['members'].append(
tgroups[gid]['memberUid'].append(
def main(uri, http_user, sort = "name", order = "asc"): """List all groups and provileges on the system, displaying them in a nice HTML page. """ start = time.time() users.reload() groups.reload() #profiles.reload() g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = _('Group...
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
prefix + name)]['members']:
prefix + name)]['memberUid']:
def main(uri, http_user, sort = "name", order = "asc"): """List all groups and provileges on the system, displaying them in a nice HTML page. """ start = time.time() users.reload() groups.reload() #profiles.reload() g = groups.groups users.Select(users.FILTER_STANDARD) tgroups = {} totals = {} title = _('Group...
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
name, g[gid]['skel'])
name, g[gid]['groupSkel'])
def html_build_group(index, tgroups = tgroups ): gid = ordered[index] name = g[gid]['name'] html_data = '''
84927f63ccb0390487678873dbd1c49eb749f5a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/84927f63ccb0390487678873dbd1c49eb749f5a9/groups.py
assert ltrace('ldap', '| __init__().')
assert ltrace('ldap', '| __init__()')
def __init__(self, configuration, users=None, groups=None, warnings=True): """ Init the LDAP backend instance. """
b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c/ldap_backend.py
def __init__(self, configuration, users=None, groups=None, warnings=True): """ Init the LDAP backend instance. """
b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c/ldap_backend.py
assert ltrace('ldap', '> initialize().')
assert ltrace('ldap', '> initialize()')
def initialize(self, enabled=True): """ try to start it without any tests (it should work if it's installed) and become available. If that fails, try to guess a little and help user resolving issue. else, just fail miserably.
b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c/ldap_backend.py
assert ltrace('ldap', '< initialize() %s.' % self.available)
assert ltrace('ldap', '< initialize(%s)' % self.available)
def initialize(self, enabled=True): """ try to start it without any tests (it should work if it's installed) and become available. If that fails, try to guess a little and help user resolving issue. else, just fail miserably.
b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c/ldap_backend.py
else: delete_user()
else: delete_user()
def delete_webfilter(): raise NotImplementedError("delete_webfilters_types not implemented.")
128f21ec2768df4310ecd8efcd74aebe244ccc82 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/128f21ec2768df4310ecd8efcd74aebe244ccc82/del.py
test_integrated_help() test_regexes() save_state(1, state_type='context')
if get_state(state_type='context') == 0: test_integrated_help() test_regexes() save_state(1, state_type='context') ctx_will_change = True else: logging.notice('Skipping context %s' % stylize(ST_NAME, "std")) ctx_will_change = False
def to_be_implemented(): """ TO BE DONE ! # # Profiles # # doit planter pour le groupe log_and_exec $ADD profile --name=profileA --group=a # doit planter pour le groupe kjsdqsdf log_and_exec $ADD profile --name=profileB --group=b --comment="le profil b" --shell=/bin/bash --quota=26 --groups=cdrom,kjsdqsdf,audio --ske...
71bb836aa180c761edf6c4cdaf1315dd30e05f7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/71bb836aa180c761edf6c4cdaf1315dd30e05f7c/core.py
ScenarioTest.reinit()
if get_state(state_type='scenarii') == 0 or ctx_will_change == True: ScenarioTest.reinit()
def to_be_implemented(): """ TO BE DONE ! # # Profiles # # doit planter pour le groupe log_and_exec $ADD profile --name=profileA --group=a # doit planter pour le groupe kjsdqsdf log_and_exec $ADD profile --name=profileB --group=b --comment="le profil b" --shell=/bin/bash --quota=26 --groups=cdrom,kjsdqsdf,audio --ske...
71bb836aa180c761edf6c4cdaf1315dd30e05f7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/71bb836aa180c761edf6c4cdaf1315dd30e05f7c/core.py
ctx_will_change = True
def to_be_implemented(): """ TO BE DONE ! # # Profiles # # doit planter pour le groupe log_and_exec $ADD profile --name=profileA --group=a # doit planter pour le groupe kjsdqsdf log_and_exec $ADD profile --name=profileB --group=b --comment="le profil b" --shell=/bin/bash --quota=26 --groups=cdrom,kjsdqsdf,audio --ske...
71bb836aa180c761edf6c4cdaf1315dd30e05f7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/71bb836aa180c761edf6c4cdaf1315dd30e05f7c/core.py
users = UGBackend.users action = users[uid]['action'] login = users[uid]['login']
user = UGBackend.users[uid].copy() action = user['action'] login = user['login']
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
ltrace('ldap', 'password: %s.' % (users[uid]['userPassword']))
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
users[uid]['userPassword'] = \ '{SHA}' + encodestring(users[uid]['userPassword']).strip()
user['userPassword'] = \ '{SHA}' + encodestring(user['userPassword']).strip()
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
modifyModlist(old_entry, users[uid],
modifyModlist(old_entry, user,
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
old_entry, users[uid], ignore_list, ignore_oldexistent=1))
old_entry, user, ignore_list, ignore_oldexistent=1))
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
users[uid]['cn'] = login users[uid]['objectClass'] = [
user['cn'] = login user['objectClass'] = [
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
users[uid]['sn'] = users[uid]['gecos']
user['sn'] = user['gecos']
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
addModlist(users[uid], ignore_list)))
addModlist(user, ignore_list)))
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
addModlist(users[uid], ignore_list))
addModlist(user, ignore_list))
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
users[uid]['action'] = None
UGBackend.users[uid]['action'] = None
def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
groups = UGBackend.groups action = groups[gid]['action'] name = groups[gid]['name']
group = UGBackend.groups[gid].copy() action = group['action'] name = group['name']
def save_group(self, gid): """ Save one group in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
old_entry, groups[gid], ignore_list, ignore_oldexistent=1))
old_entry, group, ignore_list, ignore_oldexistent=1))
def save_group(self, gid): """ Save one group in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
groups[gid]['cn'] = name groups[gid]['objectClass'] = [
group['cn'] = name group['objectClass'] = [
def save_group(self, gid): """ Save one group in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
addModlist(groups[gid], ignore_list))
addModlist(group, ignore_list))
def save_group(self, gid): """ Save one group in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
groups[gid]['action'] = None
UGBackend.groups[gid]['action'] = None
def save_group(self, gid): """ Save one group in the LDAP backend. If updating, the entry will be dropped prior of insertion. """
a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py
users.AddUser(lastname, firstname, password, opts.primary_group, opts.profile, opts.skel, login, gecos, False)
users.AddUser(lastname, firstname, password, primary_group=opts.primary_group, profile=opts.profile, skel=opts.skel, login=login, gecos=gecos, system=opts.system, batch=False)
def add_user(): """ Add a user account on the system. """ if opts.firstname is None: firstname = None else: firstname = unicode(opts.firstname) if opts.lastname is None: lastname = None else: lastname = unicode(opts.lastname) if opts.gecos is None: gecos = None else: gecos = unicode(opts.gecos) if opts.password is ...
4da9ec785b12576bac5f207a9af992cc3d40cae2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/4da9ec785b12576bac5f207a9af992cc3d40cae2/add.py
groups.AddGroup(name, description = description, system = opts.system, skel = opts.skel, gid = opts.gid, permissive = opts.permissive)
groups.AddGroup(name, description = description, system = opts.system, skel = opts.skel, gid = opts.gid, permissive = opts.permissive)
def add_group(): """ Add a POSIX group. """ if opts.description == '': description = '' else: description = unicode(opts.description) for name in opts.name.split(','): if name != '': try: groups.AddGroup(name, description = description, system = opts.system, skel = opts.skel, gid = opts.gid, permissive = opts.permiss...
4da9ec785b12576bac5f207a9af992cc3d40cae2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/4da9ec785b12576bac5f207a9af992cc3d40cae2/add.py
logging.warning("%s is not a privilege." % \
logging.warning('''group %s can't be promoted as privilege, ''' '''it is not a system group.''' % \
def append(self, privilege): """ Set append like: no doubles.""" try: self.index(privilege) except ValueError: from licorn.core.users import UsersController from licorn.core.groups import GroupsController
c8291edb9c768806e0a5ddff59697fb04c0707aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c8291edb9c768806e0a5ddff59697fb04c0707aa/privileges.py
logging.warning('''privilege %s is already not present in the '''
logging.info('''privilege %s is already not present in the '''
def remove(self, privilege): """ Remove without throw of exception """ try: list.remove(self, privilege) except ValueError: logging.warning('''privilege %s is already not present in the ''' '''whitelist, skipped.''' % \ styles.stylize(styles.ST_NAME, privilege))
bde6015db327e7049b910183ab7c4d388fac0e1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/bde6015db327e7049b910183ab7c4d388fac0e1b/privileges.py
if UsersController.is_system_uid(uid):
if uid > self.configuration.users.system_uid_min \ and uid < self.configuration.users.system_uid_max:
def check_uid(uid, minimal=minimal, batch=batch, auto_answer=auto_answer):
940d620d0570fcfb29886fd8671a43a6b4a18ede /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/940d620d0570fcfb29886fd8671a43a6b4a18ede/users.py
else: logging.progress("Checking user %s..." % \
elif self.is_standard_uid(uid): logging.progress("Checking standard account %s..." % \
def check_uid(uid, minimal=minimal, batch=batch, auto_answer=auto_answer):
940d620d0570fcfb29886fd8671a43a6b4a18ede /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/940d620d0570fcfb29886fd8671a43a6b4a18ede/users.py
return all_went_ok
else: login = self.uid_to_login(uid) logging.info('''Skipped reserved system account %s ''' '''(we don't check them at all).''' % styles.stylize(styles.ST_NAME, login)) return all_went_ok
def check_uid(uid, minimal=minimal, batch=batch, auto_answer=auto_answer):
940d620d0570fcfb29886fd8671a43a6b4a18ede /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/940d620d0570fcfb29886fd8671a43a6b4a18ede/users.py
'backends'])[1].split('\n') if 'U' in line ]
'backends'])[0].split('\n') if 'U' in line ]
def __init__(self, name, directory_scenarii, clean_func, state_file, cmd_display_func): self.name=name self.list_scenario = [] self.selected_scenario = [] self.directory_scenarii=directory_scenarii self.clean_system=clean_func self.cmd_display_func = cmd_display_func self.state_file=state_file # save the current contex...
f64e67ce4f4a810b0dacb62d0e737879f526513c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/f64e67ce4f4a810b0dacb62d0e737879f526513c/__init__.py
elif b.can_be_enabled(): b.initialize() b.check(batch, auto_answer)
elif b.name in self.available_backends: self.available_backends[b.name].check(batch, auto_answer)
def check_backends(self, batch=False, auto_answer=None): """ check all enabled backends, except the 'prefered', which is one of the enabled anyway.
26b0203107d85ef066e948b2d4845fbc71bd6f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26b0203107d85ef066e948b2d4845fbc71bd6f2d/configuration.py
if pingers > 25:
if pingers > 50:
def check_directive_daemon_threads(self): """ check the pingers number for correctness. """ assert ltrace('configuration', '| check_directive_daemon_threads()')
43dbf1adf057b66668d355529748be8d7e1b8bcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/43dbf1adf057b66668d355529748be8d7e1b8bcb/configuration.py
'''between 0 and 25.''' (
'''between 0 and 50.''' (
def check_directive_daemon_threads(self): """ check the pingers number for correctness. """ assert ltrace('configuration', '| check_directive_daemon_threads()')
43dbf1adf057b66668d355529748be8d7e1b8bcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/43dbf1adf057b66668d355529748be8d7e1b8bcb/configuration.py
stylize(ST_ , 'licornd.threads.pool_members')))
stylize(ST_COMMENT, 'licornd.threads.pool_members')))
def check_directive_daemon_threads(self): """ check the pingers number for correctness. """ assert ltrace('configuration', '| check_directive_daemon_threads()')
43dbf1adf057b66668d355529748be8d7e1b8bcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/43dbf1adf057b66668d355529748be8d7e1b8bcb/configuration.py
tmp_user_dict['shadowInactive'] = 99999 tmp_user_dict['shadowWarning'] = ''
tmp_user_dict['shadowInactive'] = '' tmp_user_dict['shadowWarning'] = 7
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False): """Add a user and return his/her (uid, login, pass)."""
2ff6415f024305dbd4b0432215a73c8d9f7274bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2ff6415f024305dbd4b0432215a73c8d9f7274bc/users.py
def execute(cmd, verbose=False):
def execute(cmd, verbose=verbose):
def execute(cmd, verbose=False): if verbose: logging.notice('running %s.' % ' '.join(cmd)) p4 = Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) output = p4.stdout.read() retcode = p4.wait() if verbose: sys.stderr.write(output) return output, retcode
1df52d2e524f04424ad39ff7b6c48acfaf92a774 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1df52d2e524f04424ad39ff7b6c48acfaf92a774/core.py
term_columns = term_size()[1] separator = '--------8<--------' * (term_columns/18)
def RunCommand(self, cmdnum, batch=False):
1df52d2e524f04424ad39ff7b6c48acfaf92a774 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1df52d2e524f04424ad39ff7b6c48acfaf92a774/core.py
os.system('sudo rm -rf %s/* %s/*' % (configuration.home_backup_dir, configuration.home_archive_dir))
execute([ 'sudo', 'rm', '-rf', '%s/*' % configuration.home_backup_dir, '%s/*' % configuration.home_archive_dir ]) execute(ADD + ['group', '--system', 'acl,admins,remotessh,licorn-wmi'])
def clean_system(): """ Remove all stuff to make the system clean, testsuite-wise.""" test_message('''cleaning system from previous runs.''') # delete them first in case of a previous failed testsuite run. # don't check exit codes or such, this will be done later. for argument in ( ['user', '''toto,tutu,tata,titi,te...
1df52d2e524f04424ad39ff7b6c48acfaf92a774 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1df52d2e524f04424ad39ff7b6c48acfaf92a774/core.py
execute(['chk', 'config', '-avvb'])
execute(['sudo', 'chk', 'config', '-avvb'])
def make_backups(mode): """Make backup of important system files before messing them up ;-) """ # this is mandatory, else there could be some inconsistencies following # backend (de)activation, and backup comparison could fail (false-negative) # because of this. execute(['chk', 'config', '-avvb']) if mode == 'unix': ...
1df52d2e524f04424ad39ff7b6c48acfaf92a774 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1df52d2e524f04424ad39ff7b6c48acfaf92a774/core.py
def RunCommand(self, cmdnum, batch=False):
2952d8e41ae40d2ecab06ada5028c9c4bf52bf16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2952d8e41ae40d2ecab06ada5028c9c4bf52bf16/core.py
'%s/%s/out.txt' % (self.base_path, cmdnum),
tmpfilename2 if gz_file else '%s/%s/out.txt' % (self.base_path, cmdnum),
def RunCommand(self, cmdnum, batch=False):
2952d8e41ae40d2ecab06ada5028c9c4bf52bf16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2952d8e41ae40d2ecab06ada5028c9c4bf52bf16/core.py