From 316b862af6b6731f57a21f81b0948f3718b4c9f3 Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Mon, 11 Feb 2019 01:21:08 -0500 Subject: [PATCH] ptclient: rxgk support Allow ptclient to use rxgk, with the new -rxgk option. While we're here, also allow the user to specify a security level of 3, to turn on rxkad encryption for non-localauth conns. Change-Id: I201154c1b5298f31912d8841f8310363e13afa08 Reviewed-on: https://gerrit.openafs.org/13501 Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk --- src/ptserver/ptclient.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ptserver/ptclient.c b/src/ptserver/ptclient.c index c7347a8..ef613f0 100644 --- a/src/ptserver/ptclient.c +++ b/src/ptserver/ptclient.c @@ -168,6 +168,7 @@ main(int argc, char **argv) char *foo; afs_int32 over; char *cell; + afs_int32 rxgk_level = 0; #ifdef AFS_AIX32_ENV /* @@ -201,15 +202,17 @@ main(int argc, char **argv) strncpy(confdir, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confdir)); else if (IsArg("server")) strncpy(confdir, AFSDIR_SERVER_ETC_DIRPATH, sizeof(confdir)); - else if (IsArg("0") || IsArg("1") || IsArg("2")) + else if (IsArg("0") || IsArg("1") || IsArg("2") || IsArg("3")) security = atoi(argv[n]); + else if (IsArg("-rxgk")) + rxgk_level = atoi(argv[++n]); else if (IsArg("-ignoreexist")) ignoreExist++; else if (IsArg("-cell")) cell = argv[++n]; else { printf - ("Usage is: 'prclient [-testconfdir | server | client] [0 | 1 | 2] [-ignoreExist] [-cell ]\n"); + ("Usage is: 'prclient [-testconfdir | server | client] [0 | 1 | 2 | 3] [-rxgk 0 | 1 | 2] [-ignoreExist] [-cell ]\n"); exit(1); } n++; @@ -219,7 +222,7 @@ main(int argc, char **argv) if (security == 0) printf("Making unauthenticated connection to prserver\n"); - code = pr_Initialize(security, confdir, cell); + code = pr_Initialize2(security, confdir, cell, rxgk_level); if (code) { afs_com_err(whoami, code, "Couldn't initialize protection library"); exit(1); -- 1.9.4