sss_ssh_authorizedkeys.c revision cb929e7df08443b7633920a15e56860c384fc012
/*
Authors:
Jan Cholasta <jcholast@redhat.com>
Copyright (C) 2012 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <talloc.h>
#include <popt.h>
#include "util/crypto/sss_crypto.h"
#include "sss_client/sss_cli.h"
#include "sss_client/ssh/sss_ssh_client.h"
{
int pc_debug = SSSDBG_DEFAULT;
struct poptOption long_options[] = {
_("The debug level to run with"), NULL },
_("The SSSD domain to use"), NULL },
};
const char *user;
struct sss_ssh_ent *ent;
size_t i;
char *repr;
int ret;
debug_prg_name = argv[0];
ret = set_locale();
ERROR("Error setting the locale\n");
ret = EXIT_FAILURE;
goto fini;
}
if (!mem_ctx) {
ERROR("Not enough memory\n");
ret = EXIT_FAILURE;
goto fini;
}
/* parse parameters */
;
if (ret != -1) {
}
}
/* append domain to username if domain is specified */
if (pc_domain) {
if (!user) {
ERROR("Not enough memory\n");
ret = EXIT_FAILURE;
goto fini;
}
} else {
}
/* look up public keys */
ERROR("Error looking up public keys\n");
ret = EXIT_FAILURE;
goto fini;
}
/* print results */
for (i = 0; i < ent->num_pubkeys; i++) {
if (!repr) {
("Out of memory formatting SSH public key\n"));
continue;
}
}
ret = EXIT_SUCCESS;
fini:
return ret;
}