c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek/*
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek SSSD
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek Files provider declarations
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek Copyright (C) 2016 Red Hat
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek This program is free software; you can redistribute it and/or modify
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek it under the terms of the GNU General Public License as published by
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek the Free Software Foundation; either version 3 of the License, or
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek (at your option) any later version.
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek This program is distributed in the hope that it will be useful,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek GNU General Public License for more details.
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek You should have received a copy of the GNU General Public License
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek*/
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#ifndef __FILES_PRIVATE_H_
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#define __FILES_PRIVATE_H_
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include "config.h"
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <talloc.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <tevent.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <errno.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <sys/types.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <nss.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <pwd.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include <grp.h>
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#include "providers/data_provider/dp.h"
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozekstruct files_id_ctx {
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct be_ctx *be;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct sss_domain_info *domain;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct files_ctx *fctx;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
0d6d493f68bb83a046d351cb3035b08ef5456b50Justin Stephenson const char **passwd_files;
0d6d493f68bb83a046d351cb3035b08ef5456b50Justin Stephenson const char **group_files;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek bool updating_passwd;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek bool updating_groups;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct tevent_req *users_req;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct tevent_req *groups_req;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct tevent_req *initgroups_req;
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek};
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek/* files_ops.c */
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozekstruct files_ctx *sf_init(TALLOC_CTX *mem_ctx,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct tevent_context *ev,
0d6d493f68bb83a046d351cb3035b08ef5456b50Justin Stephenson const char **passwd_files,
0d6d493f68bb83a046d351cb3035b08ef5456b50Justin Stephenson const char **group_files,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct files_id_ctx *id_ctx);
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek/* files_id.c */
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozekstruct tevent_req *
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozekfiles_account_info_handler_send(TALLOC_CTX *mem_ctx,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct files_id_ctx *id_ctx,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct dp_id_data *data,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct dp_req_params *params);
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozekerrno_t files_account_info_handler_recv(TALLOC_CTX *mem_ctx,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct tevent_req *req,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek struct dp_reply_std *data);
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozekvoid files_account_info_finished(struct files_id_ctx *id_ctx,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek int req_type,
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek errno_t ret);
c71e0a6710418991d759a329b8dcb77c7ad3e16eJakub Hrozek#endif /* __FILES_PRIVATE_H_ */