558998ce664055a75595371118f818084d8f2b23Jan Cholasta Jan Cholasta <jcholast@redhat.com>
558998ce664055a75595371118f818084d8f2b23Jan Cholasta Copyright (C) 2012 Red Hat
558998ce664055a75595371118f818084d8f2b23Jan Cholasta This program is free software; you can redistribute it and/or modify
558998ce664055a75595371118f818084d8f2b23Jan Cholasta it under the terms of the GNU General Public License as published by
558998ce664055a75595371118f818084d8f2b23Jan Cholasta the Free Software Foundation; either version 3 of the License, or
558998ce664055a75595371118f818084d8f2b23Jan Cholasta (at your option) any later version.
558998ce664055a75595371118f818084d8f2b23Jan Cholasta This program is distributed in the hope that it will be useful,
558998ce664055a75595371118f818084d8f2b23Jan Cholasta but WITHOUT ANY WARRANTY; without even the implied warranty of
558998ce664055a75595371118f818084d8f2b23Jan Cholasta MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
558998ce664055a75595371118f818084d8f2b23Jan Cholasta GNU General Public License for more details.
558998ce664055a75595371118f818084d8f2b23Jan Cholasta You should have received a copy of the GNU General Public License
558998ce664055a75595371118f818084d8f2b23Jan Cholasta along with this program. If not, see <http://www.gnu.org/licenses/>.
558998ce664055a75595371118f818084d8f2b23Jan Cholasta { "debug", '\0', POPT_ARG_INT | POPT_ARGFLAG_DOC_HIDDEN, &pc_debug, 0,
558998ce664055a75595371118f818084d8f2b23Jan Cholasta { "domain", 'd', POPT_ARG_STRING, &pc_domain, 0,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "set_locale() failed (%d): %s\n", ret, strerror(ret));
558998ce664055a75595371118f818084d8f2b23Jan Cholasta /* parse parameters */
558998ce664055a75595371118f818084d8f2b23Jan Cholasta pc = poptGetContext(NULL, argc, argv, long_options, 0);
558998ce664055a75595371118f818084d8f2b23Jan Cholasta BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini);
558998ce664055a75595371118f818084d8f2b23Jan Cholasta BAD_POPT_PARAMS(pc, _("User not specified\n"), ret, fini);
558998ce664055a75595371118f818084d8f2b23Jan Cholasta /* look up public keys */
bd03e67c9d2fc4ad0275e7a573385ee5b7b9307aJan Cholasta ret = sss_ssh_get_ent(mem_ctx, SSS_SSH_GET_USER_PUBKEYS,
fcbcfa69f9291936f01f24b5fcb5a7672dca46f3Jakub Hrozek "The user %s is valid, but not handled by sssd\n", pc_user);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "sss_ssh_get_ent() failed (%d): %s\n", ret, strerror(ret));
558998ce664055a75595371118f818084d8f2b23Jan Cholasta /* print results */
4a628b83d129463e7886c8cdaa31739512947e42Jan Cholasta ret = sss_ssh_format_pubkey(mem_ctx, &ent->pubkeys[i], &repr);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "sss_ssh_format_pubkey() failed (%d): %s\n",