def group_ops_setup(request): grp_file = os.environ["NSS_WRAPPER_GROUP"] backup_envvar_file("NSS_WRAPPER_GROUP") request.addfinalizer(lambda: restore_envvar_file("NSS_WRAPPER_GROUP")) grp_ops = GroupOps(grp_file) return grp_ops
def passwd_ops_setup(request): pwd_file = os.environ["NSS_WRAPPER_PASSWD"] backup_envvar_file("NSS_WRAPPER_PASSWD") request.addfinalizer(lambda: restore_envvar_file("NSS_WRAPPER_PASSWD")) pwd_ops = PasswdOps(pwd_file) return pwd_ops
def group_path(request): name = "NSS_WRAPPER_GROUP" request.addfinalizer(lambda: restore_envvar_file(name)) return backup_envvar_file(name)
def passwd_path(request): name = "NSS_WRAPPER_PASSWD" request.addfinalizer(lambda: restore_envvar_file(name)) return backup_envvar_file(name)