376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech/*
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech SSSD
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech Data Provider -- backend request
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech Copyright (C) Petr Cech <pcech@redhat.com> 2015
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech This program is free software; you can redistribute it and/or modify
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech it under the terms of the GNU General Public License as published by
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech the Free Software Foundation; either version 3 of the License, or
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech (at your option) any later version.
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech This program is distributed in the hope that it will be useful,
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech but WITHOUT ANY WARRANTY; without even the implied warranty of
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech GNU General Public License for more details.
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech You should have received a copy of the GNU General Public License
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech along with this program. If not, see <http://www.gnu.org/licenses/>.
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech*/
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech#include "providers/data_provider_req.h"
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina#define be_req_to_str(be_req_t) #be_req_t
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cechconst char *be_req2str(dbus_uint32_t req_type)
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech{
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech switch (req_type & BE_REQ_TYPE_MASK) {
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_USER:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_USER);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_GROUP:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_GROUP);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_INITGROUPS:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_INITGROUPS);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_NETGROUP:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_NETGROUP);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_SERVICES:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_SERVICES);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_SUDO_FULL:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_SUDO_FULL);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_SUDO_RULES:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_SUDO_RULES);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_BY_SECID:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_BY_SECID);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_USER_AND_GROUP:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_USER_AND_GROUP);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_BY_UUID:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_BY_UUID);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech case BE_REQ_BY_CERT:
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina return be_req_to_str(BE_REQ_BY_CERT);
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech }
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech return "UNKNOWN_REQ";
376eaf187c13c2a1eaea0ffbdd970b6b563ab74cPetr Cech}