Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
Merged PR 7580: Change log level when error is NERR_SetupNotJoined
Browse files Browse the repository at this point in the history
Change log level when error is NERR_SetupNotJoined

Related work items: #157347
  • Loading branch information
RBoulton-BT committed Aug 28, 2018
1 parent e1780e6 commit f4e2d52
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
7 changes: 7 additions & 0 deletions lsass/include/lsautils.h
Expand Up @@ -138,6 +138,13 @@
LSA_SAFE_LOG_STRING(LwWin32ExtErrorToName(dwError)), \
(long)(hServer? ((PLSA_SRV_API_STATE)hServer)->peerPID : getpid()))

#define LSA_LOG_VERBOSE_API_FAILED(hServer, dwError, szFmt, ...) \
LSA_LOG_VERBOSE("Failed to " szFmt " -> error = %u, symbol = %s, client pid = %ld", \
## __VA_ARGS__, \
dwError, \
LSA_SAFE_LOG_STRING(LwWin32ExtErrorToName(dwError)), \
(long)(hServer? ((PLSA_SRV_API_STATE)hServer)->peerPID : getpid()))

#define LSA_LOG_VERBOSE_ENTRY_NOT_FOUND(hServer, dwError, szFmt, ...) \
LSA_LOG_VERBOSE("Failed to " szFmt " -> error = no such entry, client pid = %ld", \
## __VA_ARGS__, \
Expand Down
15 changes: 12 additions & 3 deletions lsass/server/api/provider.c
Expand Up @@ -123,9 +123,18 @@ LsaSrvProviderIoControl(

error:

LSA_LOG_ERROR_API_FAILED(hServer, dwError,
"run provider specific request (request code = %u, provider = '%s')",
dwIoControlCode, LSA_SAFE_LOG_STRING(pszTargetProviderName));
if (dwError == NERR_SetupNotJoined)
{
LSA_LOG_VERBOSE_API_FAILED(hServer, dwError,
"run provider specific request (request code = %u, provider = '%s')",
dwIoControlCode, LSA_SAFE_LOG_STRING(pszTargetProviderName));
}
else
{
LSA_LOG_ERROR_API_FAILED(hServer, dwError,
"run provider specific request (request code = %u, provider = '%s')",
dwIoControlCode, LSA_SAFE_LOG_STRING(pszTargetProviderName));
}

*pdwOutputBufferSize = 0;
*ppOutputBuffer = NULL;
Expand Down

0 comments on commit f4e2d52

Please sign in to comment.