summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2015-12-03 18:15:42 +0100
committerStef Walter <stefw@redhat.com>2015-12-07 10:00:10 +0100
commitec1fd29641e9f4638d00e3ccaaa20927d126aa9d (patch)
tree2b026fbd5a65a5a14b0de24ba0e2e09ef3c0597a /tools
parent4694aa7e8781c70dfe9b2d6b99f13456edd2eb2a (diff)
Allow additional ccache for updates
https://bugs.freedesktop.org/show_bug.cgi?id=92908 Signed-off-by: Stef Walter <stefw@redhat.com> * Removed redundant changes for default keytab
Diffstat (limited to 'tools')
-rw-r--r--tools/computer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/computer.c b/tools/computer.c
index 6ce007c..55f8d90 100644
--- a/tools/computer.c
+++ b/tools/computer.c
@@ -397,6 +397,7 @@ adcli_tool_computer_update (adcli_conn *conn,
{ "host-fqdn", required_argument, 0, opt_host_fqdn },
{ "computer-name", required_argument, 0, opt_computer_name },
{ "host-keytab", required_argument, 0, opt_host_keytab },
+ { "login-ccache", optional_argument, NULL, opt_login_ccache },
{ "service-name", required_argument, NULL, opt_service_name },
{ "os-name", required_argument, NULL, opt_os_name },
{ "os-version", required_argument, NULL, opt_os_version },
@@ -441,10 +442,11 @@ adcli_tool_computer_update (adcli_conn *conn,
argc -= optind;
argv += optind;
- /* Force use of a keytab for computer account login */
- adcli_conn_set_allowed_login_types (conn, ADCLI_LOGIN_COMPUTER_ACCOUNT);
- ktname = adcli_enroll_get_keytab_name (enroll);
- adcli_conn_set_login_keytab_name (conn, ktname ? ktname : "");
+ if (adcli_conn_get_login_ccache_name (conn) == NULL) {
+ /* Force use of a keytab for computer account login */
+ adcli_conn_set_allowed_login_types (conn, ADCLI_LOGIN_COMPUTER_ACCOUNT);
+ adcli_conn_set_login_keytab_name (conn, ktname ? ktname : "");
+ }
res = adcli_enroll_load (enroll);
if (res != ADCLI_SUCCESS) {