]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
ubik: Fix encryption selection in ugen
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 17 Jul 2013 22:10:42 +0000 (23:10 +0100)
committerRuss Allbery <rra@debian.org>
Mon, 22 Jul 2013 22:26:31 +0000 (15:26 -0700)
Make sure that we encrypt when requested to by the application

Change-Id: Ib2e1292993a0be113f0c95ef1a7b0e79a273798d

src/ubik/uinit.c

index 45a7216f15507081a85740c847b45de059c94b72..d7e9c6cfff37e0399347b41b46e103ddb97c0c81 100644 (file)
@@ -77,7 +77,11 @@ ugen_ClientInit(int noAuthFlag, char *confDir, char *cellName, afs_int32 sauth,
                    funcName, AFSDIR_SERVER_ETC_DIRPATH);
            return -1;
        }
-       code = afsconf_ClientAuth(tdir, &sc, &scIndex); /* sets sc,scIndex */
+       if (gen_rxkad_level == rxkad_crypt) { /* -encrypt */
+           code = afsconf_ClientAuthSecure(tdir, &sc, &scIndex);
+       } else {
+           code = afsconf_ClientAuth(tdir, &sc, &scIndex);     /* sets sc,scIndex */
+       }
        if (code) {
            afsconf_Close(tdir);
            fprintf(stderr,