11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech/*
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech SSSD - cmd2str util
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech Copyright (C) Petr Cech <pcech@redhat.com> 2015
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech This program is free software; you can redistribute it and/or modify
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech it under the terms of the GNU General Public License as published by
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech the Free Software Foundation; either version 3 of the License, or
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech (at your option) any later version.
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech This program is distributed in the hope that it will be useful,
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech but WITHOUT ANY WARRANTY; without even the implied warranty of
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech GNU General Public License for more details.
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech You should have received a copy of the GNU General Public License
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech along with this program. If not, see <http://www.gnu.org/licenses/>.
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech*/
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#include "sss_client/sss_cli.h"
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#include "util/sss_cli_cmd.h"
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#include "util/util.h"
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cechconst char *sss_cmd2str(enum sss_cli_command cmd)
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech{
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech switch (cmd) {
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* null */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_CLI_NULL:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_CLI_NULL";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* version */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_GET_VERSION:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_GET_VERSION";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* passwd */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETPWNAM:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETPWNAM";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETPWUID:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETPWUID";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETPWENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETPWENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETPWENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETPWENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDPWENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDPWENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* group */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETGRNAM:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETGRNAM";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETGRGID:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETGRGID";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETGRENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETGRENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETGRENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETGRENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDGRENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDGRENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_INITGR:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_INITGR";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#if 0
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* aliases */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETALIASBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETALIASBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETALIASBYPORT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETALIASBYPORT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETALIASENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETALIASENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETALIASENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETALIASENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDALIASENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDALIASENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* ethers */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETHOSTTON:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETHOSTTON";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETNTOHOST:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETNTOHOST";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETETHERENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETETHERENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETETHERENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETETHERENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDETHERENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDETHERENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* hosts */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETHOSTBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETHOSTBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETHOSTBYNAME2:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETHOSTBYNAME2";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETHOSTBYADDR:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETHOSTBYADDR";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETHOSTENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETHOSTENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETHOSTENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETHOSTENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDHOSTENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDHOSTENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#endif
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* netgroup */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETNETGRENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETNETGRENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETNETGRENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETNETGRENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDNETGRENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDNETGRENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* SSS_NSS_INNETGR:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_INNETGR";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech break; */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#if 0
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* networks */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETNETBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETNETBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETNETBYADDR:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETNETBYADDR";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETNETENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETNETENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETNETENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETNETENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDNETENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDNETENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* protocols */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETPROTOBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETPROTOBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETPROTOBYNUM:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETPROTOBYNUM";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETPROTOENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETPROTOENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETPROTOENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETPROTOENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDPROTOENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDPROTOENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* rpc */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETRPCBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETRPCBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETRPCBYNUM:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETRPCBYNUM";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETRPCENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETRPCENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETRPCENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETRPCENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDRPCENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDRPCENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#endif
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* services */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSERVBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSERVBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSERVBYPORT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSERVBYPORT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETSERVENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETSERVENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSERVENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSERVENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDSERVENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDSERVENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#if 0
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* shadow */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSPNAM:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSPNAM";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSPUID:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSPUID";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_SETSPENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_SETSPENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSPENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSPENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_ENDSPENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_ENDSPENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech#endif
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* SUDO */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_SUDO_GET_SUDORULES:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_SUDO_GET_SUDORULES";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_SUDO_GET_DEFAULTS:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_SUDO_GET_DEFAULTS";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* autofs */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_AUTOFS_SETAUTOMNTENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_AUTOFS_SETAUTOMNTENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_AUTOFS_GETAUTOMNTENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_AUTOFS_GETAUTOMNTENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_AUTOFS_GETAUTOMNTBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_AUTOFS_GETAUTOMNTBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_AUTOFS_ENDAUTOMNTENT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_AUTOFS_ENDAUTOMNTENT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* SSH */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_SSH_GET_USER_PUBKEYS:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_SSH_GET_USER_PUBKEYS";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_SSH_GET_HOST_PUBKEYS:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_SSH_GET_HOST_PUBKEYS";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* PAM related calls */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_AUTHENTICATE:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_AUTHENTICATE";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_SETCRED:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_SETCRED";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_ACCT_MGMT:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_ACCT_MGMT";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_OPEN_SESSION:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_OPEN_SESSION";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_CLOSE_SESSION:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_CLOSE_SESSION";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_CHAUTHTOK:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_CHAUTHTOK";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_CHAUTHTOK_PRELIM:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_CHAUTHTOK_PRELIM";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_CMD_RENEW:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_CMD_RENEW";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAM_PREAUTH:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAM_PREAUTH";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* PAC responder calls */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_PAC_ADD_PAC_USER:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_PAC_ADD_PAC_USER";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech /* ID-SID mapping calls */
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSIDBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSIDBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETSIDBYID:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETSIDBYID";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETNAMEBYSID:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETNAMEBYSID";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETIDBYSID:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETIDBYSID";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech case SSS_NSS_GETORIGBYNAME:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "SSS_NSS_GETORIGBYNAME";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech default:
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech DEBUG(SSSDBG_MINOR_FAILURE,
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech "Translation's string is missing for command [%#x].\n", cmd);
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech return "UNKNOWN COMMAND";
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech }
11e8f3ecdddf8edd8b1bbe9f41b49ce8b709b92aPetr Cech}