rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
""" Display a styles.stylized warning message on stderr, only if verbose
""" Display a stylized warning message on stderr, only if verbose
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)),
stylize(ST_WARNING, '/2\\'), mytime(), mesg)),
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
stylize(ST_WARNING, '/2\\'), mytime(), mesg))
def warning2(mesg, once=False, listener=None): """ Display a styles.stylized warning message on stderr, only if verbose level > INFO. """ if once: try: already_displayed = __warningsdb[mesg] return except KeyError, e: __warningsdb[mesg] = True if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data="%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write("%s%s %s\n" % ( styles.stylize(styles.ST_WARNING, '/2\\'), mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
""" Display a non-styles.stylized notice message on stderr."""
""" Display a non-stylized notice message on stderr."""
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)),
stylize(ST_INFO, '*'), mytime(), mesg)),
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
stylize(ST_INFO, '*'), mytime(), mesg))
def notice(mesg, listener=None): """ Display a non-styles.stylized notice message on stderr.""" assert ltrace('logging', '| notice(%s L%s/R%s)' % (verbose.NOTICE, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.NOTICE: listener.process(LicornMessage(data=" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.NOTICE: sys.stderr.write(" %s %s %s\n" % ( styles.stylize(styles.ST_INFO, '*'), mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
""" Display a styles.stylized information message on stderr."""
""" Display a stylized information message on stderr."""
def info(mesg, listener=None): """ Display a styles.stylized information message on stderr.""" assert ltrace('logging', '| info(%s L%s/R%s)' % (verbose.INFO, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.INFO: listener.process( LicornMessage(data=" * %s %s\n" % (mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.INFO: sys.stderr.write(" * %s %s\n" % (mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
""" Display a styles.stylized progress message on stderr. """
""" Display a stylized progress message on stderr. """
def progress(mesg, listener=None): """ Display a styles.stylized progress message on stderr. """ assert ltrace('logging', '| progress(%s L%s/R%s)' % (verbose.PROGRESS, options.verbose, listener.verbose if listener else '-')) if listener and listener.verbose >= verbose.PROGRESS: listener.process( LicornMessage(data=" > %s %s\n" % (mytime(), mesg)), options.msgproc.getProxy()) if options.verbose >= verbose.PROGRESS: sys.stderr.write(" > %s %s\n" % (mytime(), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
"""Display a styles.stylized debug message on stderr."""
"""Display a stylized debug message on stderr."""
def debug(mesg): """Display a styles.stylized debug message on stderr.""" if options.verbose >= verbose.DEBUG: sys.stderr.write( "%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
stylize(ST_DEBUG, 'DEBUG'), mesg) )
def debug(mesg): """Display a styles.stylized debug message on stderr.""" if options.verbose >= verbose.DEBUG: sys.stderr.write( "%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG'), mesg) )
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
"""Display a styles.stylized debug2 message on stderr."""
"""Display a stylized debug2 message on stderr."""
def debug2(mesg): """Display a styles.stylized debug2 message on stderr.""" if options.verbose >= verbose.DEBUG2: sys.stderr.write("%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
stylize(ST_DEBUG, 'DEBUG2'), mesg))
def debug2(mesg): """Display a styles.stylized debug2 message on stderr.""" if options.verbose >= verbose.DEBUG2: sys.stderr.write("%s: %s\n" % ( styles.stylize(styles.ST_DEBUG, 'DEBUG2'), mesg))
a4712f82b2f0d14c0f1c465fc523b05667dfb57d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a4712f82b2f0d14c0f1c465fc523b05667dfb57d/logging.py
@staticmethod def is_standard_login(login): """ Return true if login is standard (not system). """ try: return UsersController.is_standard_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login)
def is_system_login(login): """ return true if login is system. """ try: return UsersController.is_system_uid( UsersController.login_cache[login]) except KeyError: raise exceptions.DoesntExistsException( logging.SYSU_USER_DOESNT_EXIST % login)
1e6cad42a4394b65eb8e5506630a957905679401 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/1e6cad42a4394b65eb8e5506630a957905679401/users.py
def DeleteGroup(self, name, del_users, no_archive, bygid=None, batch=False): """ Delete an Licorn group """ if name is None and bygid is None: raise exceptions.BadArgumentError( "You must specify a name or a GID.")
2c077ed94d22eafbd280368aeb0095b72f07e1b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c077ed94d22eafbd280368aeb0095b72f07e1b5/groups.py
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !"""
def minifind(path, type=None, perms=None, mindepth=0, maxdepth=99, exclude=[], followlinks=False, followmounts=True): """ Mimic the GNU find behaviour in python. returns an iterator. """
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude))
ltrace('fsapi', '''> minifind(%s, type=%s, mindepth=%s, maxdepth=%s, ''' '''exclude=%s, followlinks=%s, followmounts=%s)''' % ( path, type, mindepth, maxdepth, exclude, followlinks, followmounts))
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
else: break
else: break
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \
and ( (type is None and entry_type & S_IFSTD) \ or entry_type == type) \
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
if (entry_type & S_IFLNK and not followlinks) \
if (entry_type == S_IFLNK and not followlinks) \
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
except OSError, e:
else: ltrace('fsapi', ' minifind(excluded=%s)' % entry) except (IOError, OSError), e:
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
for cmd in self.pre_cmds: out_path += 'pre_%s/' % make_path(cmd)
for pre_cmd in self.pre_cmds: out_path += 'pre_%s/' % make_path(pre_cmd)
def Prepare(self, cmd): """ Run commands mandatory for func_test to succeed. """
575bf8f9dcb1aadba0b3612cd8e06300fcb0bb1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/575bf8f9dcb1aadba0b3612cd8e06300fcb0bb1e/core.py
execute(cmd)
execute(pre_cmd)
def Prepare(self, cmd): """ Run commands mandatory for func_test to succeed. """
575bf8f9dcb1aadba0b3612cd8e06300fcb0bb1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/575bf8f9dcb1aadba0b3612cd8e06300fcb0bb1e/core.py
'''test.responsibilly,utilicateur.accentue,user_test''' \
'''test.responsibilly,utilicateur.accentue,user_test,''' \
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,test,utilisager.normal,''' \ '''test.responsibilly,utilicateur.accentue,user_test''' \ '''GRP-ACL-user''', '--no-archive'], ['profile', '--group=utilisagers', '--del-users', '--no-archive'], ['profile', '--group=responsibilisateurs', '--del-users', '--no-archive'], ['group', '''test_users_A,test_users_B,groupeA,B-Group_Test,''' \ '''groupe_a_skel,ACL_tests,MOD_tests,SYSTEM-test,SKEL-tests,''' \ '''ARCHIVES-test,group_test,GRP-ACL-test'''], ): execute(DEL + argument) os.system('sudo rm -rf %s/* %s/*' % (configuration.home_backup_dir, configuration.home_archive_dir)) test_message('''system cleaned from previous testsuite runs.''')
3856b4189731a1137c9a37383ba4f202726a9084 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/3856b4189731a1137c9a37383ba4f202726a9084/core.py
[ 'sudo', 'rm', '-rf', '%s/*' % configuration.home_archive_dir ]
[ 'sudo', 'rm', '-vrf', '%s/*' % configuration.home_archive_dir ]
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
3856b4189731a1137c9a37383ba4f202726a9084 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/3856b4189731a1137c9a37383ba4f202726a9084/core.py
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
3856b4189731a1137c9a37383ba4f202726a9084 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/3856b4189731a1137c9a37383ba4f202726a9084/core.py
['sudo', 'rm', '-rf', "%s/%s/%s" % (
['sudo', 'rm', '-vrf', "%s/%s/%s" % (
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
3856b4189731a1137c9a37383ba4f202726a9084 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/3856b4189731a1137c9a37383ba4f202726a9084/core.py
'''deleted) is deleted'''
'''deleted) is deleted (avoids
def chk_acls_cmds(group, subdir=None): return [ 'sudo', 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names['plural'], group, '/%s' % subdir if subdir else '') ]
3856b4189731a1137c9a37383ba4f202726a9084 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/3856b4189731a1137c9a37383ba4f202726a9084/core.py
if need_rewriting: self.save_group(gid)
def load_groups(self): """ Load groups from /etc/{group,gshadow} and /etc/licorn/group. """
d21e2e87eeab506d408c9005ec31718d13501531 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/d21e2e87eeab506d408c9005ec31718d13501531/ldap_backend.py
return LicornWarningsDB.__warnings[item]
return LicornWarningsDB.warnings[item]
def __getitem__(self, item): return LicornWarningsDB.__warnings[item]
d8c442069578889b69b79afa468b9dad5c33eb87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/d8c442069578889b69b79afa468b9dad5c33eb87/logging.py
LicornWarningsDB.__warningsdb[item] = value
LicornWarningsDB.warnings[item] = value
def __setitem__(self, item, value): LicornWarningsDB.__warningsdb[item] = value
d8c442069578889b69b79afa468b9dad5c33eb87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/d8c442069578889b69b79afa468b9dad5c33eb87/logging.py
return LicornWarningsDB.__warningsdb.keys()
return LicornWarningsDB.warnings.keys() __warningsdb = LicornWarningsDB()
def keys(self): return LicornWarningsDB.__warningsdb.keys()
d8c442069578889b69b79afa468b9dad5c33eb87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/d8c442069578889b69b79afa468b9dad5c33eb87/logging.py
def __del__(self): # just in case it wasn't done before (in batched operations, for example). self.WriteConf()
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
UsersController.users, UsersController.login_cache = self.backend.load_users(self.groups)
UsersController.users, UsersController.login_cache = \ self.backend.load_users(self.groups)
def reload(self): """ Load (or reload) the data structures from the system files. """ UsersController.users, UsersController.login_cache = self.backend.load_users(self.groups)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
- 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators
- 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators
def Select( self, filter_string ): """ Filter user accounts on different criteria. Criteria are: - 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators - more to come... """
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def Select( self, filter_string ): """ Filter user accounts on different criteria. Criteria are: - 'system users': show only «system» users (root, bin, daemon, apache...), not normal user account. - 'normal users': keep only «normal» users, which includes Licorn administrators - more to come... """
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False):
def AddUser(self, lastname = None, firstname = None, password = None, primary_group=None, profile=None, skel=None, login=None, gecos=None, system = False, batch=False):
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_FST_LST)
raise exceptions.BadArgumentError( logging.SYSU_SPECIFY_LGN_FST_LST)
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LF_OR_GECOS)
raise exceptions.BadArgumentError( logging.SYSU_SPECIFY_LF_OR_GECOS)
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.LicornRuntimeError("Can't build a valid login (%s) with the firstname/lastname (%s/%s) you provided." % (login, firstname, lastname))
raise exceptions.LicornRuntimeError( "Can't build a valid login (%s) with the " \ "firstname/lastname (%s/%s) you provided." % ( login, firstname, lastname) )
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.BadArgumentError(logging.SYSU_MALFORMED_LOGIN % (login, styles.stylize(styles.ST_REGEX, hlstr.regex['login']))) if not login_autogenerated and len(login) > UsersController.configuration.users.login_maxlenght: raise exceptions.LicornRuntimeError("Login too long (%d characters, but must be shorter or equal than %d)." % (len(login),UsersController.configuration.users.login_maxlenght) )
raise exceptions.BadArgumentError( logging.SYSU_MALFORMED_LOGIN % ( login, styles.stylize(styles.ST_REGEX, hlstr.regex['login']))) if not login_autogenerated and \ len(login) > UsersController.configuration.users.login_maxlenght: raise exceptions.LicornRuntimeError( "Login too long (%d characters," \ " but must be shorter or equal than %d)." % ( len(login), UsersController.configuration.users.login_maxlenght) )
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.LicornRuntimeError("Can't build a valid GECOS (%s) with the firstname/lastname (%s/%s) or login you provided." % (gecos, firstname, lastname))
raise exceptions.LicornRuntimeError( "Can't build a valid GECOS (%s) with the" \ " firstname/lastname (%s/%s) or login you provided." % ( gecos, firstname, lastname) )
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.BadArgumentError(logging.SYSU_MALFORMED_GECOS % (gecos, styles.stylize(styles.ST_REGEX, hlstr.regex['description'])))
raise exceptions.BadArgumentError( logging.SYSU_MALFORMED_GECOS % ( gecos, styles.stylize(styles.ST_REGEX, hlstr.regex['description']) ) )
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.BadArgumentError("The skel you specified doesn't exist on this system. Valid skels are: %s." % UsersController.configuration.users.skels)
raise exceptions.BadArgumentError( "The skel you specified doesn't exist on this system." \ " Valid skels are: %s." % \ UsersController.configuration.users.skels)
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.AlreadyExistsException, "A user named « %s » already exists !" % login
raise exceptions.AlreadyExistsException, \ "A user named « %s » already exists !" % login
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.UpstreamBugException, "A group named `%s' exists on the system, this could eventually conflict in Debian/Ubuntu system tools. Please choose another user's login." % login
raise exceptions.UpstreamBugException, \ "A group named `%s' exists on the system," \ " this could eventually conflict in Debian/Ubuntu system" \ " tools. Please choose another user's login." % login
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) logging.notice(logging.SYSU_AUTOGEN_PASSWD % (styles.stylize(styles.ST_LOGIN, login), styles.stylize(styles.ST_SECRET, password)))
password = hlstr.generate_password( UsersController.configuration.mAutoPasswdSize) logging.notice(logging.SYSU_AUTOGEN_PASSWD % ( styles.stylize(styles.ST_LOGIN, login), styles.stylize(styles.ST_SECRET, password) ) )
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
tmp_user_dict['loginShell'] = UsersController.profiles.profiles[profile]['shell'] tmp_user_dict['gid'] = UsersController.groups.name_to_gid(UsersController.profiles.profiles[profile]['primary_group'])
tmp_user_dict['loginShell'] = \ UsersController.profiles.profiles[profile]['shell'] tmp_user_dict['gid'] = \ UsersController.groups.name_to_gid( UsersController.profiles.profiles[profile]['primary_group'])
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
tmp_user_dict['homeDirectory'] = ("%s/%s" % (UsersController.configuration.users.base_path, login))
tmp_user_dict['homeDirectory'] = ("%s/%s" % ( UsersController.configuration.users.base_path, login))
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
skel_to_apply = UsersController.profiles.profiles[profile]['skel_dir']
skel_to_apply = \ UsersController.profiles.profiles[profile]['skel_dir']
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.LicornRuntimeError("The profile %s does not exist on this system (was: %s) !" % (profile, e))
raise exceptions.LicornRuntimeError( "The profile %s does not exist on this system (was: %s) !" \ % (profile, e))
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
tmp_user_dict['loginShell'] = UsersController.configuration.users.default_shell tmp_user_dict['homeDirectory'] = "%s/%s" % (UsersController.configuration.users.base_path, login)
tmp_user_dict['loginShell'] = \ UsersController.configuration.users.default_shell tmp_user_dict['homeDirectory'] = "%s/%s" % ( UsersController.configuration.users.base_path, login)
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
if skel is None and os.path.isdir(UsersController.groups.groups[pg_gid]['skel']):
if skel is None and \ os.path.isdir(UsersController.groups.groups[pg_gid]['skel']):
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
tmp_user_dict['gid'] = UsersController.configuration.users.default_gid tmp_user_dict['loginShell'] = UsersController.configuration.users.default_shell tmp_user_dict['homeDirectory'] = "%s/%s" % (UsersController.configuration.users.base_path, login)
tmp_user_dict['gid'] = \ UsersController.configuration.users.default_gid tmp_user_dict['loginShell'] = \ UsersController.configuration.users.default_shell tmp_user_dict['homeDirectory'] = "%s/%s" % ( UsersController.configuration.users.base_path, login)
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
uid = pyutils.next_free(self.users.keys(), self.configuration.users.system_uid_min, self.configuration.users.system_uid_max) else: uid = pyutils.next_free(self.users.keys(), self.configuration.users.uid_min, self.configuration.users.uid_max) tmp_user_dict['crypted_password'] = crypt.crypt(password, "$1$%s" % hlstr.generate_password())
uid = pyutils.next_free(self.users.keys(), self.configuration.users.system_uid_min, self.configuration.users.system_uid_max) else: uid = pyutils.next_free(self.users.keys(), self.configuration.users.uid_min, self.configuration.users.uid_max) tmp_user_dict['crypted_password'] = crypt.crypt(password, "$1$%s" % hlstr.generate_password())
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
shutil.copytree(skel_to_apply, tmp_user_dict['homeDirectory'])
shutil.copytree(skel_to_apply, tmp_user_dict['homeDirectory'])
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
sys.stderr.write(process.pipecmd('%s\n%s\n' % (password, password), ['smbpasswd', '-a', login, '-s']))
sys.stderr.write(process.pipecmd('%s\n%s\n' % (password, password), ['smbpasswd', '-a', login, '-s']))
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.debug("user %s is going to be added to %s." % (styles.stylize(styles.ST_LOGIN, login), groups_to_add_user_to))
logging.debug("user %s is going to be added to %s." % ( styles.stylize(styles.ST_LOGIN, login), groups_to_add_user_to))
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.warning( "ROLLBACK because " + str(e))
logging.warning( "ROLLBACK create user because '%s'." % str(e))
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.info(logging.SYSU_CREATED_USER % (styles.stylize(styles.ST_LOGIN, login), styles.stylize(styles.ST_UGID, uid)))
logging.info(logging.SYSU_CREATED_USER % ( styles.stylize(styles.ST_LOGIN, login), styles.stylize(styles.ST_UGID, uid)))
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)."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.progress("Going to remove user %s(%s), groups %s." % (login, str(uid), UsersController.users[uid]['groups']) )
logging.progress("Going to remove user %s(%s), groups %s." % ( login, str(uid), UsersController.users[uid]['groups']) )
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
UsersController.groups.RemoveUsersFromGroup(group, [ login ], batch=True)
UsersController.groups.RemoveUsersFromGroup(group, [ login ], batch=True)
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.info(logging.SYSU_DELETED_USER % styles.stylize(styles.ST_LOGIN, login))
logging.info(logging.SYSU_DELETED_USER % styles.stylize(styles.ST_LOGIN, login))
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.warning("Problem deleting home dir %s (was: %s)" % (styles.stylize(styles.ST_PATH, homedir), e)) else: UsersController.configuration.CheckBaseDirs(minimal = True, batch = True) user_archive_dir = "%s/%s.deleted.%s" % (UsersController.configuration.home_archive_dir,
logging.warning("Problem deleting home dir %s (was: %s)" % ( styles.stylize(styles.ST_PATH, homedir), e)) else: UsersController.configuration.CheckBaseDirs(minimal = True, batch = True) user_archive_dir = "%s/%s.deleted.%s" % ( UsersController.configuration.home_archive_dir,
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.warning("Home dir %s doesn't exist, thus not archived." % styles.stylize(styles.ST_PATH, homedir))
logging.warning( "Home dir %s doesn't exist, thus not archived." % \ styles.stylize(styles.ST_PATH, homedir))
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False): """ Delete a user """ if login is None and uid is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize)
password = hlstr.generate_password( UsersController.configuration.mAutoPasswdSize)
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login))
logging.warning(logging.SYSU_SET_EMPTY_PASSWD % \ styles.stylize(styles.ST_LOGIN, login))
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
UsersController.users[uid]['crypted_password'] = crypt.crypt(password, "$1$%s" % hlstr.generate_password())
UsersController.users[uid]['crypted_password'] = crypt.crypt( password, "$1$%s" % hlstr.generate_password())
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
UsersController.users[uid]['passwd_last_change'] = str(int(time()/86400))
UsersController.users[uid]['passwd_last_change'] = str( int(time()/86400) )
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.notice("Set user %s's password to %s." % (styles.stylize(styles.ST_NAME, login), styles.stylize(styles.ST_IMPORTANT, password))) else: logging.info('Changed password for user %s.' % styles.stylize(styles.ST_NAME, login))
logging.notice("Set user %s's password to %s." % ( styles.stylize(styles.ST_NAME, login), styles.stylize(styles.ST_IMPORTANT, password))) else: logging.info('Changed password for user %s.' % \ styles.stylize(styles.ST_NAME, login))
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
sys.stderr.write(process.pipecmd("%s\n%s\n" % (password, password), ['smbpasswd', login, '-s']))
sys.stderr.write(process.pipecmd("%s\n%s\n" % (password, password), ['smbpasswd', login, '-s']))
def ChangeUserPassword(self, login, password = None, display = False): """ Change the password of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if password is None: password = hlstr.generate_password(UsersController.configuration.mAutoPasswdSize) elif password == "": logging.warning(logging.SYSU_SET_EMPTY_PASSWD % styles.stylize(styles.ST_LOGIN, login)) # TODO: automatically remove user from remotessh ?
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.BadArgumentError(logging.SYSU_MALFORMED_GECOS % (gecos, styles.stylize(styles.ST_REGEX, hlstr.regex['description'])))
raise exceptions.BadArgumentError(logging.SYSU_MALFORMED_GECOS % ( gecos, styles.stylize(styles.ST_REGEX, hlstr.regex['description'])))
def ChangeUserGecos(self, login, gecos = ""): """ Change the gecos of a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.LicornRuntimeError("Invalid shell ! valid shells are %s." % UsersController.configuration.users.shells)
raise exceptions.LicornRuntimeError( "Invalid shell ! valid shells are %s." % \ UsersController.configuration.users.shells)
def ChangeUserShell(self, login, shell = ""): """ Change the shell of a user. """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
UsersController.users[uid]['crypted_password'] = '!' + UsersController.users[uid]['crypted_password'] logging.info('Locked user account %s.' % styles.stylize(styles.ST_LOGIN, login)) else: UsersController.users[uid]['crypted_password'] = UsersController.users[uid]['crypted_password'][1:] logging.info('Unlocked user account %s.' % styles.stylize(styles.ST_LOGIN, login))
UsersController.users[uid]['crypted_password'] = '!' + \ UsersController.users[uid]['crypted_password'] logging.info('Locked user account %s.' % \ styles.stylize(styles.ST_LOGIN, login)) else: UsersController.users[uid]['crypted_password'] = \ UsersController.users[uid]['crypted_password'][1:] logging.info('Unlocked user account %s.' % \ styles.stylize(styles.ST_LOGIN, login))
def LockAccount(self, login, lock = True): """(Un)Lock a user account.""" if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
""" Apply a skel on a user """
""" Apply a skel on a user """
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
raise exceptions.AbsolutePathError(skel)
raise exceptions.AbsolutePathError(skel)
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
process.syscmd("cp -r %s/* %s/.??* %s" % (skel, skel, UsersController.users[uid]['homeDirectory']) )
process.syscmd("cp -r %s/* %s/.??* %s" % (skel, skel, UsersController.users[uid]['homeDirectory']) )
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
process.syscmd("chown %s %s/%s" % (UsersController.users[uid]['login'], UsersController.users[uid]['homeDirectory'], fileordir) )
process.syscmd("chown %s %s/%s" % ( UsersController.users[uid]['login'], UsersController.users[uid]['homeDirectory'], fileordir) )
def ApplyUserSkel(self, login, skel): """ Apply a skel on a user """ if login is None: raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LOGIN) if skel is None: raise exceptions.BadArgumentError, "You must specify a skel" if not os.path.isabs(skel) or not os.path.isdir(skel): raise exceptions.AbsolutePathError(skel)
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
data += " <groups>%s</groups>\n" % ','.join(UsersController.users[uid]['groups'])
data += " <groups>%s</groups>\n" % \ ','.join(UsersController.users[uid]['groups'])
def build_xml_output_user_data(uid): data = '''
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None):
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None):
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None): """Check user accounts and account data consistency."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.progress("Checking user %s..." % styles.stylize(styles.ST_LOGIN, user))
logging.progress("Checking user %s..." % \ styles.stylize(styles.ST_LOGIN, user))
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
logging.progress("Checking user account %s..." % styles.stylize(styles.ST_NAME, user))
logging.progress("Checking user account %s..." % \ styles.stylize(styles.ST_NAME, user))
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
home_exclude_list = [ '.ssh', '.gnupg', '.gnome2_private', '.gvfs' ]
home_exclude_list = [ '.ssh', '.gnupg', '.gnome2_private', '.gvfs' ]
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
} for dir in home_exclude_list if os.path.exists('%s/%s' % (user_home, dir)) ])
} for dir in home_exclude_list if \ os.path.exists('%s/%s' % (user_home, dir)) ])
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
'access_acl': "%s,g:%s:r-x,g:www-data:r-x,%s" % (acl_base, UsersController.configuration.defaults.admin_group, acl_restrictive_mask), 'default_acl': "%s,g:%s:rwx,g:www-data:r-x,%s" % (acl_base, UsersController.configuration.defaults.admin_group, acl_mask), 'content_acl': "%s,g:%s:rw-,g:www-data:r--,%s" % (file_acl_base, UsersController.configuration.defaults.admin_group, file_acl_mask),
'access_acl': "%s,g:%s:r-x,g:www-data:r-x,%s" % ( acl_base, UsersController.configuration.defaults.admin_group, acl_restrictive_mask), 'default_acl': "%s,g:%s:rwx,g:www-data:r-x,%s" % ( acl_base, UsersController.configuration.defaults.admin_group, acl_mask), 'content_acl': "%s,g:%s:rw-,g:www-data:r--,%s" % ( file_acl_base, UsersController.configuration.defaults.admin_group, file_acl_mask),
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
UsersController.configuration.users.mailbox_type == UsersController.configuration.MAIL_TYPE_HOME_MAILDIR: maildir_base = '%s/%s' % (user_home, UsersController.configuration.users.mailbox) home_exclude_list.append(UsersController.configuration.users.mailbox[:-1]) for dir in ( maildir_base, '%stmp' % maildir_base, '%scur' % maildir_base,'%snew' % maildir_base ):
UsersController.configuration.users.mailbox_type == \ UsersController.configuration.MAIL_TYPE_HOME_MAILDIR: maildir_base = '%s/%s' % (user_home, UsersController.configuration.users.mailbox) home_exclude_list.append( UsersController.configuration.users.mailbox[:-1]) for dir in ( maildir_base, '%stmp' % maildir_base, '%scur' % maildir_base,'%snew' % maildir_base ):
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
all_went_ok &= fsapi.check_posix_ugid_and_perms('%s/%s' % ( user_home, file), uid, gid, 00600, batch, auto_answer, self.groups, self)
all_went_ok &= fsapi.check_posix_ugid_and_perms( '%s/%s' % (user_home, file), uid, gid, 00600, batch, auto_answer, self.groups, self)
def check_user(user, minimal = minimal, batch = batch, auto_answer = auto_answer):
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py