rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
action="store", type="string", dest="newskel", default = None, | action="store", type="string", dest="newskel", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="newdescription", default = None, | action="store", type="string", dest="newdescription", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store_true", dest="permissive", default = None, | action="store_true", dest="permissive", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store_false", dest="permissive", default = None, | action="store_false", dest="permissive", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="granted_profiles_to_add", default = None, | action="store", type="string", dest="granted_profiles_to_add", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="granted_profiles_to_del", default = None, | action="store", type="string", dest="granted_profiles_to_del", default=None, | def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="newname", default = None, | action="store", type="string", dest="newname", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="newgroup", default = None, | action="store", type="string", dest="newgroup", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="description", default = None, | action="store", type="string", dest="description", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="newshell", default = None, | action="store", type="string", dest="newshell", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="int", dest="newquota", default = None, | action="store", type="int", dest="newquota", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="newskel", default = None, | action="store", type="string", dest="newskel", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="groups_to_add", default = None, | action="store", type="string", dest="groups_to_add", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="groups_to_del", default = None, | action="store", type="string", dest="groups_to_del", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="apply_to_groups", default = None, | action="store", type="string", dest="apply_to_groups", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store_true", dest="apply_to_all_accounts", default = None, | action="store_true", dest="apply_to_all_accounts", default=None, | def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="name", default = None, | action="store", type="string", dest="name", default=None, | def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common ... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="newname", default = None, | action="store", type="string", dest="newname", default=None, | def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common ... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="parent", default = None, | action="store", type="string", dest="parent", default=None, | def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common ... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="description", default = None, | action="store", type="string", dest="description", default=None, | def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common ... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="path", default = None, | action="store", type="string", dest="path", default=None, | def mod_path_parse_arguments(app, configuration): usage_text = "\n\t%s path [--path=]<fichier_ou_repertoire> [--add-keywords=<kw1[,kw1,…]>] [--del-keywords=<kw1[,kw1,…]>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--clear-keywords] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="keywords_to_add", default = None, | action="store", type="string", dest="keywords_to_add", default=None, | def mod_path_parse_arguments(app, configuration): usage_text = "\n\t%s path [--path=]<fichier_ou_repertoire> [--add-keywords=<kw1[,kw1,…]>] [--del-keywords=<kw1[,kw1,…]>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--clear-keywords] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
action="store", type="string", dest="keywords_to_del", default = None, | action="store", type="string", dest="keywords_to_del", default=None, | def mod_path_parse_arguments(app, configuration): usage_text = "\n\t%s path [--path=]<fichier_ou_repertoire> [--add-keywords=<kw1[,kw1,…]>] [--del-keywords=<kw1[,kw1,…]>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--clear-keywords] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(a... | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py |
gid = self.groups.name_to_gid(group) | if self.groups.is_standard_group(group): raise exceptions.BadArgumentError( '''The group %s(%s) is not a system group. It cannot be ''' '''added as primary group of a profile.''' % ( styles.stylize(styles.ST_NAME, group), styles.stylize(styles.ST_UGID, self.groups.name_to_gid(group)))) else: gid = self.groups.name_to_g... | def AddProfile(self, name, group, profileQuota=1024, groups=[], description='', profileShell=None, profileSkel=None, force_existing=False): """ Add a user profile (self.groups is an instance of GroupsController and is needed to create the profile group). """ | 14304804713bfaefbd5bd11c22f6ccd4c702822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/14304804713bfaefbd5bd11c22f6ccd4c702822f/profiles.py |
elif e.errno == 2: pass | 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. | df37e418bf74a1016e5c335ec4af16ad5f43f84c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/df37e418bf74a1016e5c335ec4af16ad5f43f84c/ldap_backend.py | |
logging.warning("Home dir %s does not exist, can't delete it !" % styles.stylize(styles.ST_PATH, homedir)) if not no_archive : | logging.warning("Problem deleting home dir %s (was: %s)" % (styles.stylize(styles.ST_PATH, homedir), e)) else : | 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) | 55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py |
user_archive_dir = "%s/%s.deleted.%s" % (UsersController.configuration.home_archive_dir, login, strftime("%Y%m%d-%H%M%S", gmtime())) | user_archive_dir = "%s/%s.deleted.%s" % (UsersController.configuration.home_archive_dir, login, strftime("%Y%m%d-%H%M%S", gmtime())) | 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) | 55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py |
logging.info(logging.SYSU_ARCHIVED_USER % (homedir, styles.stylize(styles.ST_PATH, user_archive_dir))) | logging.info(logging.SYSU_ARCHIVED_USER % (homedir, styles.stylize(styles.ST_PATH, user_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) | 55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py |
logging.warning("Home dir %s does not exist, can't archive it !" % 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) | 55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py |
del(UsersController.login_cache[login]) del(UsersController.users[uid]) logging.info(logging.SYSU_DELETED_USER % styles.stylize(styles.ST_LOGIN, login)) if not batch : self.WriteConf() | 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) | 55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py | |
"The profile '%s' already exists." % group) | '''The group '%s' is already taken by another profile (%s). ''' '''Please choose another one.''' % ( group, self.group_to_name(group))) | def AddProfile(self, name, group, profileQuota=1024, groups=[], description='', profileShell=None, profileSkel=None, force_existing=False): """ Add a user profile (self.groups is an instance of GroupsController and is needed to create the profile group). """ | 2a986f26a804f983a85ba00976c80ad42eca427e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2a986f26a804f983a85ba00976c80ad42eca427e/profiles.py |
if system and self.is_system_gid(existing_gid): | if system and self.is_system_gid(existing_gid) \ or not system and self.is_standard_gid(existing_gid): | def __add_group(self, name, system, manual_gid=None, description = "", groupSkel = "", batch=False, force=False): """ Add a POSIX group, write the system data files. Return the gid of the group created.""" | 19f24f68276c8be10c2bb309ef6575c7d4f758a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/19f24f68276c8be10c2bb309ef6575c7d4f758a1/groups.py |
f = self.send_head() if f: f.close() | try: f = self.send_head() if f: f.close() except socket.error, e: logging.warning('%s: harmless exception in do_HEAD(): %s. ' 'Full traceback follows:' % ( current_thread().name, str(e).splitlines()[0])) | def do_HEAD(self): f = self.send_head() if f: f.close() | 26616824ce153098ffae97adf6f74e20cabfd843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26616824ce153098ffae97adf6f74e20cabfd843/wmi.py |
f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: buf = f.read(LMC.configuration.licornd.buffer_size) while buf: self.wfile.write(buf) | try: f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: | def do_GET(self): f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: buf = f.read(LMC.configuration.licornd.buffer_size) while buf: self.wfile.write(buf) buf = f.read(LMC.configuration.licornd.buffer_size) f.close() | 26616824ce153098ffae97adf6f74e20cabfd843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26616824ce153098ffae97adf6f74e20cabfd843/wmi.py |
f.close() | while buf: self.wfile.write(buf) buf = f.read(LMC.configuration.licornd.buffer_size) f.close() except socket.error, e: logging.warning('%s: harmless exception in do_GET(): %s. ' 'Full traceback follows:' % ( current_thread().name, str(e).splitlines()[0])) | def do_GET(self): f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: buf = f.read(LMC.configuration.licornd.buffer_size) while buf: self.wfile.write(buf) buf = f.read(LMC.configuration.licornd.buffer_size) f.close() | 26616824ce153098ffae97adf6f74e20cabfd843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26616824ce153098ffae97adf6f74e20cabfd843/wmi.py |
for member in groups.groups[g]['members']: if member == entry[0]: | for member in groups.groups[g]['memberUid']: if member == temp_user_dict['login']: | def account_lock(value, tmp_entry=temp_user_dict): try: # get around an error where password is not base64 encoded. password = decodestring(value.split('}',1)[1]) except Exception: password = value | 7a870bda1ec1fa555d3a08eb79997dba442878dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/7a870bda1ec1fa555d3a08eb79997dba442878dd/ldap_backend.py |
for line in posix1e.ACL( file='%s/%s' % (GroupsController.configuration.defaults.home_base_path, | for line in posix1e.ACL( file='%s/%s' % ( GroupsController.configuration.defaults.home_base_path, | def GetHiddenState(self): """ See if /home/groups is readable or not. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
- 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators | - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
self.filtered_groups = filter(self.is_standard_gid, GroupsController.groups.keys()) | self.filtered_groups = filter(self.is_standard_gid, GroupsController.groups.keys()) | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
self.filtered_groups = filter(self.is_system_gid, GroupsController.groups.keys()) | self.filtered_groups = filter(self.is_system_gid, GroupsController.groups.keys()) | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
for name in GroupsController.configuration.groups.privileges_whitelist: | for name in \ GroupsController.configuration.groups.privileges_whitelist: | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
if GroupsController.groups[gid]['name'].startswith(GroupsController.configuration.groups.guest_prefix): | if GroupsController.groups[gid]['name'].startswith( GroupsController.configuration.groups.guest_prefix): | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
if GroupsController.groups[gid]['name'].startswith(GroupsController.configuration.groups.resp_prefix): | if GroupsController.groups[gid]['name'].startswith( GroupsController.configuration.groups.resp_prefix): | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
self.filtered_groups = filter(self.is_empty_gid, GroupsController.groups.keys()) | self.filtered_groups = filter(self.is_empty_gid, GroupsController.groups.keys()) | def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,... | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
""" Export the groups list to human readable (= « get group ») form. """ | """ Export the groups list to human readable (= « get group ») form. """ | def ExportCLI(self, long): """ Export the groups list to human readable (= « get group ») form. """ if self.filter_applied: gids = self.filtered_groups else: gids = GroupsController.groups.keys() gids.sort() | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
""" Export groups the way UNIX get does, separating fields with ":" """ | """ Export groups the way UNIX get does, separating with ":" """ | def ExportOneGroupFromGid(gid, mygroups = GroupsController.groups): """ Export groups the way UNIX get does, separating fields with ":" """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def ExportOneGroupFromGid(gid, mygroups = GroupsController.groups): """ Export groups the way UNIX get does, separating fields with ":" """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
data += " <group>\n" \ + " <name>" + group['name'] + "</name>\n" \ + " <userPassword>" + group['userPassword'] + "</userPassword>\n" \ + " <gid>" + str(gid) + "</gid>\n" \ + " <description>" + group['description'] + "</description>\n" if not self.is_system_gid(gid): data += " <groupSkel>" + group['groupS... | data += ''' <group> <name>%s</name> <gid>%s</gid>%s%s <permissive>%s</permissive>\n%s%s%s</group>\n''' % ( group['name'], str(gid), '\n <userPassword>%s</userPassword>' % group['userPassword'] \ if group.has_key('userPassword') else '', '\n <description>%s</description>' % group['description'] \ if group.has_key('des... | def ExportXML(self, long): """ Export the groups list to XML. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
def __add_group(self, name, system, manual_gid=None, description = "", groupSkel = "", batch=False, force=False): """ Add a POSIX group, write the system data files. Return the gid of the group created.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
def DeleteGroup(self, name, del_users, no_archive, bygid = None, batch=False): | def DeleteGroup(self, name, del_users, no_archive, bygid=None, batch=False): | 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." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
raise exceptions.BadArgumentError, "You must specify a name or a GID." | raise exceptions.BadArgumentError( "You must specify a name or a GID.") | 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." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
if not del_users: if prim_memb != set(): raise exceptions.BadArgumentError, "The group still has members. You must delete them first, or force their automatic deletion with an option." home = '%s/%s/%s' % (GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], n... | if prim_memb != set() and not del_users: raise exceptions.BadArgumentError('''The group still has ''' '''members. You must delete them first, or force their ''' '''automatic deletion with the --del-users option. WARNING: ''' '''this is a bad idea, use with caution.''') home = '%s/%s/%s' % ( GroupsController.configurat... | 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." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
raise NotImplementedError("This function is disabled, it is not yet complete.") | raise NotImplementedError( "This function is disabled, it is not yet complete.") | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
except exceptions.LicornRuntimeException: | except exceptions.LicornRuntimeException: | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 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'], GroupsController.groups[gid]['name']) new_home = "%s/%s/%s" % (GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], new_name) | home = "%s/%s/%s" % ( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) new_home = "%s/%s/%s" % ( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], new_name) | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
tmpname = GroupsController.configuration.groups.resp_prefix + name | tmpname = GroupsController.configuration.groups.resp_prefix \ + name | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
tmpname = GroupsController.configuration.groups.guest_prefix + name | tmpname = GroupsController.configuration.groups.guest_prefix \ + name | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
except ValueError: pass | except ValueError: pass | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
raise exceptions.AlreadyExistsError("the new name you have choosen, %s, is already taken by another group !" % styles.stylize(styles.ST_NAME, new_name)) | raise exceptions.AlreadyExistsError( '''the new name you have choosen, %s, is already taken by ''' '''another group !''' % \ styles.stylize(styles.ST_NAME, new_name)) | def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group.""" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
raise exceptions.BadArgumentError("The skel you specified doesn't exist on this system. Valid skels are: %s." % str(GroupsController.configuration.users.skels)) | raise exceptions.BadArgumentError('''The skel you specified ''' '''doesn't exist on this system. Valid skels are: %s.''' % \ str(GroupsController.configuration.users.skels)) | def ChangeGroupSkel(self, name, groupSkel): """ Change the description of a group """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if groupSkel is None: raise exceptions.BadArgumentError, "You must specify a groupSkel" | 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 to add." | raise exceptions.BadArgumentError( 'You must specify a group name to add.') | def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.progress("Group %s already in the list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)) ) | logging.progress( "Group %s already in the list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p))) | def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.info("Added group %s in the groups list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)) ) | logging.info( "Added group %s in the groups list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p))) | def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
_users_to_add = self.__find_group_members(users, GroupsController.profiles[p]['groupName']) | _users_to_add = self.__find_group_members(users, GroupsController.profiles[p]['groupName']) | def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.warning("Profile %s doesn't exist, ignored." % styles.stylize(styles.ST_NAME, p)) | logging.warning("Profile %s doesn't exist, ignored." % styles.stylize(styles.ST_NAME, p)) | def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add." | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
""" Disallow the users of the profiles given to access to the shared dir. """ | """ Disallow the users of the profiles given to access to the shared dir. """ | def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
raise exceptions.BadArgumentError, "You must specify a name" | raise exceptions.BadArgumentError,("You must specify a name") | def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
if p in profiles.profiles: if name in profiles.profiles[p]['memberGid']: print "Delete group '" + name + "' from the groups list of the profile '" + p + "'" profiles.DeleteGroupsFromProfile([name]) _users_to_del = self.__find_group_members(users, profiles.profiles[p]['groupName']) self.RemoveUsersFromGroup(name, _use... | if name in profiles.profiles[p]['memberGid']: logging.notice("Deleting group '%s' from the profile '%s'." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p))) profiles.DeleteGroupsFromProfile([name]) _users_to_del = self.__find_group_members(users, profiles[p]['groupName']) self.RemoveUsersFr... | def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
print "Profile '" + str(p) + "' doesn't exist, it's ignored" | logging.info('Group %s already absent from profile %s.' % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p))) | def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.progress("User %s is already a member of %s, skipped." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name))) | logging.progress( "User %s is already a member of %s, skipped." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name))) | def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)) ) | styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name))) | def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
elif name.startswith(GroupsController.configuration.groups.resp_prefix): | elif name.startswith( GroupsController.configuration.groups.resp_prefix): | def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
link_basename = GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.resp_prefix, "", 1) elif name.startswith(GroupsController.configuration.groups.guest_prefix): link_basename = GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.guest_prefix, "", 1) | link_basename = \ GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.resp_prefix, "", 1) elif name.startswith( GroupsController.configuration.groups.guest_prefix): link_basename = \ GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.guest_prefix, "", 1) | def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
link_src = os.path.join(GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], link_basename) link_dst = os.path.join(GroupsController.users.users[uid]['homeDirectory'], | link_src = os.path.join( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], link_basename) link_dst = os.path.join( GroupsController.users.users[uid]['homeDirectory'], | def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
GroupsController.users.users[GroupsController.users.login_to_uid(u)]['groups'].remove(name) | GroupsController.users.users[ GroupsController.users.login_to_uid(u) ]['groups'].remove(name) | def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
link_src = os.path.join(GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) for link in fsapi.minifind(GroupsController.users.users[uid]['homeDirectory'], maxdepth = 2, type = stat.S_IFLNK): | link_src = os.path.join( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) for link in fsapi.minifind( GroupsController.users.users[uid]['homeDirectory'], maxdepth = 2, type = stat.S_IFLNK): | def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.info("Deleted symlink %s." % styles.stylize(styles.ST_LINK, link) ) | logging.info("Deleted symlink %s." % styles.stylize(styles.ST_LINK, link)) | def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
raise exceptions.LicornRuntimeError("Unable to delete symlink %s (was: %s)." % (styles.stylize(styles.ST_LINK, link), str(e)) ) logging.info("Removed user %s from members of %s." % (styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)) ) | raise exceptions.LicornRuntimeError( "Unable to delete symlink %s (was: %s)." % ( styles.stylize(styles.ST_LINK, link), str(e)) ) logging.info("Removed user %s from members of %s." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name))) | def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.progress("User %s is already not a member of %s, skipped." % (styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name))) | logging.info( "User %s is already not a member of %s, skipped." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name))) | def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list" | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc. the "@GE"... | def BuildGroupACL(self, gid, path=""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path \ in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ]. the "@GE" and ... | def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc. | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
file_acl_base = "u::rw@UE,g::---,o:---,g:%s:rw@GE,g:%s:r-@GE,g:%s:rw@GE" \ | file_acl_base = \ "u::rw@UE,g::---,o:---,g:%s:rw@GE,g:%s:r-@GE,g:%s:rw@GE" \ | def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc. | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
'access_acl': "%s,g:%s:rwx,g:www-data:r-x,%s" % (acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,g:www-data:r-x,%s" % (acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,g:www-data:r--,%s" % (file_acl_base, group, group_file_acl, file_acl_mask), | 'access_acl': "%s,g:%s:rwx,g:www-data:r-x,%s" % ( acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,g:www-data:r-x,%s" % ( acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,g:www-data:r--,%s" % ( file_acl_base, group, group_file_acl, file_acl_mask), | def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc. | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
'access_acl': "%s,g:%s:rwx,g:www-data:--x,%s" % (acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,%s" % (acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,%s" % (file_acl_base, group, group_file_acl, file_acl_mask), | 'access_acl': "%s,g:%s:rwx,g:www-data:--x,%s" % ( acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,%s" % ( acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,%s" % ( file_acl_base, group, group_file_acl, file_acl_mask), | def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc. | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
"""Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. | """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
for (prefix, title) in ( ( GroupsController.configuration.groups.resp_prefix, "responsibles" ), ( GroupsController.configuration.groups.guest_prefix, "guests" ) ): | for (prefix, title) in ( (GroupsController.configuration.groups.resp_prefix, "responsibles" ), (GroupsController.configuration.groups.guest_prefix, "guests") ): | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.progress("Checking system group %s..." % styles.stylize(styles.ST_NAME, group_name)) | logging.progress("Checking system group %s..." % styles.stylize(styles.ST_NAME, group_name)) | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
warn_message = logging.SYSG_SYSTEM_GROUP_REQUIRED % (styles.stylize(styles.ST_NAME, group_name), styles.stylize(styles.ST_NAME, group)) | warn_message = logging.SYSG_SYSTEM_GROUP_REQUIRED % ( styles.stylize(styles.ST_NAME, group_name), styles.stylize(styles.ST_NAME, group)) | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
GroupsController.name_cache[ prefix[0] + group ] = temp_gid | GroupsController.name_cache[prefix[0]+group] = temp_gid | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
logging.info("Created system group %s." % styles.stylize(styles.ST_NAME, group_name)) | logging.info("Created system group %s." % styles.stylize(styles.ST_NAME, group_name)) | def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py |
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """ | 2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py | ||
logging.progress("Checking group %s..." % styles.stylize(styles.ST_NAME, group)) all_went_ok &= self.CheckAssociatedSystemGroups(group, minimal, batch, auto_answer) group_home = "%s/%s/%s" % (GroupsController.configuration.defaults.home_base_path, | logging.progress("Checking group %s..." % styles.stylize(styles.ST_NAME, group)) all_went_ok &= self.CheckAssociatedSystemGroups( group, minimal, batch, auto_answer) group_home = "%s/%s/%s" % ( GroupsController.configuration.defaults.home_base_path, | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.