auditU: also report for rxkad-always-encrypt
authorBen Kaduk <kaduk@mit.edu>
Wed, 27 Nov 2013 22:06:33 +0000 (17:06 -0500)
committerD Brashear <shadow@your-file-system.com>
Mon, 9 Jun 2014 22:39:09 +0000 (18:39 -0400)
The logic that works for security index 2 also works for index 3.

While here, update a comment in preparation for rxgk.

Change-Id: Ifd868fa8d9d0ba2f422fa1fac43e4f583d27a1ff
Reviewed-on: http://gerrit.openafs.org/10527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>

src/audit/audit.c

index b2e6672..6c88c35 100644 (file)
@@ -419,7 +419,8 @@ osi_auditU(struct rx_call *call, char *audEvent, int errCode, ...)
            if (secClass == RX_SECIDX_NULL) {   /* unauthenticated */
                osi_audit("AFS_Aud_Unauth", (-1), AUD_STR, audEvent, AUD_END);
                strcpy(afsName, "--UnAuth--");
-           } else if (secClass == RX_SECIDX_KAD) {     /* authenticated */
+           } else if (secClass == RX_SECIDX_KAD || secClass == RX_SECIDX_KAE) {
+               /* authenticated with rxkad */
                 char tcell[MAXKTCREALMLEN];
                 char name[MAXKTCNAMELEN];
                 char inst[MAXKTCNAMELEN];
@@ -447,7 +448,7 @@ osi_auditU(struct rx_call *call, char *audEvent, int errCode, ...)
                        strlcat(afsName, tcell, sizeof(afsName));
                    }
                }
-           } else {            /* Unauthenticated & unknown */
+           } else {            /* Unauthenticated and/or unknown */
                osi_audit("AFS_Aud_UnknSec", (-1), AUD_STR, audEvent, AUD_END);
                 strcpy(afsName, "--Unknown--");
            }