diff --git a/src/WINNT/afsd/afsd_eventmessages.mc b/src/WINNT/afsd/afsd_eventmessages.mc index 33d5638193..7c4bc9ee13 100644 --- a/src/WINNT/afsd/afsd_eventmessages.mc +++ b/src/WINNT/afsd/afsd_eventmessages.mc @@ -314,4 +314,22 @@ Language=English OpenAFS Stopping due to error (%1:%2): %3. . +MessageId= +Severity=Informational +Facility=System +SymbolicName=MSG_CRYPT_OFF +Language=English +Security Level is Clear. +. + + +MessageId= +Severity=Informational +Facility=System +SymbolicName=MSG_CRYPT_ON +Language=English +Security Level is Crypt. +. + + ;#endif /* __AFSD_EVENTMESSAGES_H_ 1 */ diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index 7fee9f530b..b851b425eb 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -891,6 +891,11 @@ int afsd_InitCM(char **reasonP) afsi_log("Default SecurityLevel is clear"); } + if (cryptall) + LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_CRYPT_ON); + else + LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_CRYPT_OFF); + #ifdef AFS_AFSDB_ENV dummyLen = sizeof(cm_dnsEnabled); code = RegQueryValueEx(parmKey, "UseDNS", NULL, NULL, diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index cbb0fa96cb..f62b171a83 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -2452,10 +2452,18 @@ long cm_IoctlGetRxkcrypt(smb_ioctl_t *ioctlp, cm_user_t *userp) long cm_IoctlSetRxkcrypt(smb_ioctl_t *ioctlp, cm_user_t *userp) { + afs_int32 c = cryptall; + cm_SkipIoctlPath(ioctlp); memcpy(&cryptall, ioctlp->inDatap, sizeof(cryptall)); + if (c != cryptall) { + if (cryptall) + LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_CRYPT_ON); + else + LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_CRYPT_OFF); + } return 0; }