Windows: Trace wkssvc and srvsvc rpc calls
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 18 Sep 2009 14:25:59 +0000 (10:25 -0400)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Sat, 19 Sep 2009 18:13:09 +0000 (11:13 -0700)
Add osi_Log statements identifying which RPCs are being called
from the wkssvc and srvsvc modules

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/465
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/rpc_srvsvc.c
src/WINNT/afsd/rpc_wkssvc.c

index 9a36bb3..d59e8ae 100644 (file)
@@ -98,6 +98,7 @@ NET_API_STATUS NetrConnectionEnum(
     /* [out] */ DWORD *TotalEntries,
     /* [unique][out][in] */ DWORD *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrConnectionEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -110,6 +111,7 @@ NET_API_STATUS NetrFileEnum(
     /* [out] */ DWORD *TotalEntries,
     /* [unique][out][in] */ DWORD *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrFileEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -119,6 +121,7 @@ NET_API_STATUS NetrFileGetInfo(
     /* [in] */ DWORD Level,
     /* [switch_is][out] */ LPFILE_INFO InfoStruct)
 {
+    osi_Log0(afsd_logp, "NetrFileGetInfo not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -126,6 +129,7 @@ NET_API_STATUS NetrFileClose(
     /* [unique][string][in] */ SRVSVC_HANDLE ServerName,
     /* [in] */ DWORD FileId)
 {
+    osi_Log0(afsd_logp, "NetrFileClose not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -138,6 +142,7 @@ NET_API_STATUS NetrSessionEnum(
     /* [out] */ DWORD *TotalEntries,
     /* [unique][out][in] */ DWORD *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrSessionEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -146,6 +151,7 @@ NET_API_STATUS NetrSessionDel(
     /* [unique][string][in] */ WCHAR *ClientName,
     /* [unique][string][in] */ WCHAR *UserName)
 {
+    osi_Log0(afsd_logp, "NetrSessionDel not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -155,6 +161,7 @@ NET_API_STATUS NetrShareAdd(
     /* [switch_is][in] */ LPSHARE_INFO InfoStruct,
     /* [unique][out][in] */ DWORD *ParmErr)
 {
+    osi_Log0(afsd_logp, "NetrShareAdd not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -457,6 +464,8 @@ NET_API_STATUS NetrShareEnum(
     size_t        space_available = 0;
     afs_uint32    first_entry = 1;
 
+    osi_Log1(afsd_logp, "NetrShareEnum level %u", InfoStruct->Level);
+
     cm_InitReq(&req);
 
     RPC_SRVSVC_ShareEnumAgeCheck();
@@ -710,6 +719,8 @@ NET_API_STATUS NetrShareGetInfo(
     clientchar_t pathstr[CELL_MAXNAMELEN + VL_MAXNAMELEN + 1 + CM_PREFIX_VOL_CCH];
     DWORD  cblen;
 
+    osi_Log1(afsd_logp, "NetrShareGetInfo level %u", Level);
+
     cm_InitReq(&req);
 
     /* Allocate the memory for the response */
@@ -880,6 +891,7 @@ NET_API_STATUS NetrShareSetInfo(
     /* [switch_is][in] */ LPSHARE_INFO ShareInfo,
     /* [unique][out][in] */ DWORD *ParmErr)
 {
+    osi_Log0(afsd_logp, "NetrShareSetInfo not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -888,6 +900,7 @@ NET_API_STATUS NetrShareDel(
     /* [string][in] */ WCHAR *NetName,
     /* [in] */ DWORD Reserved)
 {
+    osi_Log0(afsd_logp, "NetrShareDel not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -896,6 +909,7 @@ NET_API_STATUS NetrShareDelSticky(
     /* [string][in] */ WCHAR *NetName,
     /* [in] */ DWORD Reserved)
 {
+    osi_Log0(afsd_logp, "NetrShareDelSticky not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -904,6 +918,7 @@ NET_API_STATUS NetrShareCheck(
     /* [string][in] */ WCHAR *Device,
     /* [out] */ DWORD *Type)
 {
+    osi_Log0(afsd_logp, "NetrShareCheck not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -912,6 +927,7 @@ NET_API_STATUS NetrServerGetInfo(
     /* [in] */ DWORD Level,
     /* [switch_is][out] */ LPSERVER_INFO InfoStruct)
 {
+    osi_Log1(afsd_logp, "NetrServerGetInfo level %u", Level);
     /*
     * How much space do we need and do we have that much room?
     * For now, just assume we can return everything in one shot
@@ -1020,6 +1036,7 @@ NET_API_STATUS NetrServerSetInfo(
     /* [switch_is][in] */ LPSERVER_INFO ServerInfo,
     /* [unique][out][in] */ DWORD *ParmErr)
 {
+    osi_Log0(afsd_logp, "NetrServerSetInfo not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1031,6 +1048,7 @@ NET_API_STATUS NetrServerDiskEnum(
     /* [out] */ DWORD *TotalEntries,
     /* [unique][out][in] */ DWORD *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrServerDiskEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1041,6 +1059,7 @@ NET_API_STATUS NetrServerStatisticsGet(
     /* [in] */ DWORD Options,
     /* [out] */ LPSTAT_SERVER_0 *InfoStruct)
 {
+    osi_Log0(afsd_logp, "NetrServerStatisticsGet not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1049,6 +1068,7 @@ NET_API_STATUS NetrServerTransportAdd(
     /* [in] */ DWORD Level,
     /* [in] */ LPSERVER_TRANSPORT_INFO_0 Buffer)
 {
+    osi_Log0(afsd_logp, "NetrServerTransportAdd not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1059,6 +1079,7 @@ NET_API_STATUS NetrServerTransportEnum(
     /* [out] */ DWORD *TotalEntries,
     /* [unique][out][in] */ DWORD *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrServerTransportEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1067,6 +1088,7 @@ NET_API_STATUS NetrServerTransportDel(
     /* [in] */ DWORD Level,
     /* [in] */ LPSERVER_TRANSPORT_INFO_0 Buffer)
 {
+    osi_Log0(afsd_logp, "NetrServerTransportDel not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1074,6 +1096,7 @@ NET_API_STATUS NetrRemoteTOD(
     /* [unique][string][in] */ SRVSVC_HANDLE ServerName,
     /* [out] */ LPTIME_OF_DAY_INFO *BufferPtr)
 {
+    osi_Log0(afsd_logp, "NetrRemoteTOD not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1083,6 +1106,7 @@ NET_API_STATUS NetprPathType(
     /* [out] */ DWORD *PathType,
     /* [in] */ DWORD Flags)
 {
+    osi_Log0(afsd_logp, "NetprPathType not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1095,6 +1119,7 @@ NET_API_STATUS NetprPathCanonicalize(
     /* [out][in] */ DWORD *PathType,
     /* [in] */ DWORD Flags)
 {
+    osi_Log0(afsd_logp, "NetprPathCanonicalize not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1105,6 +1130,7 @@ long NetprPathCompare(
     /* [in] */ DWORD PathType,
     /* [in] */ DWORD Flags)
 {
+    osi_Log0(afsd_logp, "NetprPathCompare not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1114,6 +1140,7 @@ NET_API_STATUS NetprNameValidate(
     /* [in] */ DWORD NameType,
     /* [in] */ DWORD Flags)
 {
+    osi_Log0(afsd_logp, "NetprNameValidate not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1125,6 +1152,7 @@ NET_API_STATUS NetprNameCanonicalize(
     /* [in] */ DWORD NameType,
     /* [in] */ DWORD Flags)
 {
+    osi_Log0(afsd_logp, "NetprNameCanonicalize not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1135,6 +1163,7 @@ long NetprNameCompare(
     /* [in] */ DWORD NameType,
     /* [in] */ DWORD Flags)
 {
+    osi_Log0(afsd_logp, "NetprNameCompare not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1145,6 +1174,7 @@ NET_API_STATUS NetrShareEnumSticky(
     /* [out] */ DWORD *TotalEntries,
     /* [unique][out][in] */ DWORD *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrShareEnumSticky not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1154,12 +1184,14 @@ NET_API_STATUS NetrShareDelStart(
     /* [in] */ DWORD Reserved,
     /* [out] */ PSHARE_DEL_HANDLE ContextHandle)
 {
+    osi_Log0(afsd_logp, "NetrShareDelStart not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
 NET_API_STATUS NetrShareDelCommit(
     /* [out][in] */ PSHARE_DEL_HANDLE ContextHandle)
 {
+    osi_Log0(afsd_logp, "NetrShareDelCommit not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1170,6 +1202,7 @@ DWORD NetrpGetFileSecurity(
     /* [in] */ SECURITY_INFORMATION RequestedInformation,
     /* [out] */ PADT_SECURITY_DESCRIPTOR *SecurityDescriptor)
 {
+    osi_Log0(afsd_logp, "NetprGetFileSecurity not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1180,6 +1213,7 @@ DWORD NetrpSetFileSecurity(
     /* [in] */ SECURITY_INFORMATION SecurityInformation,
     /* [in] */ PADT_SECURITY_DESCRIPTOR SecurityDescriptor)
 {
+    osi_Log0(afsd_logp, "NetprSetFileSecurity not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1188,6 +1222,7 @@ NET_API_STATUS NetrServerTransportAddEx(
     /* [in] */ DWORD Level,
     /* [switch_is][in] */ LPTRANSPORT_INFO Buffer)
 {
+    osi_Log0(afsd_logp, "NetrServerTransportAddEx not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1195,6 +1230,7 @@ NET_API_STATUS NetrDfsGetVersion(
     /* [unique][string][in] */ SRVSVC_HANDLE ServerName,
     /* [out] */ DWORD *Version)
 {
+    osi_Log0(afsd_logp, "NetrDfsGetVersion not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1207,6 +1243,7 @@ NET_API_STATUS NetrDfsCreateLocalPartition(
     /* [in] */ LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
     /* [in] */ int Force)
 {
+    osi_Log0(afsd_logp, "NetrDfsCreateLocalPartition not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1215,6 +1252,7 @@ NET_API_STATUS NetrDfsDeleteLocalPartition(
     /* [in] */ GUID *Uid,
     /* [string][in] */ WCHAR *Prefix)
 {
+    osi_Log0(afsd_logp, "NetrDfsDeleteLocalPartition not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1224,6 +1262,7 @@ NET_API_STATUS NetrDfsSetLocalVolumeState(
     /* [string][in] */ WCHAR *Prefix,
     /* [in] */ unsigned long State)
 {
+    osi_Log0(afsd_logp, "NetrDfsSetLocalVolumeState not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1235,6 +1274,7 @@ NET_API_STATUS NetrDfsCreateExitPoint(
     /* [range][in] */ DWORD ShortPrefixLen,
     /* [size_is][string][out] */ WCHAR *ShortPrefix)
 {
+    osi_Log0(afsd_logp, "NetrDfsCreateExitPoint not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1244,6 +1284,7 @@ NET_API_STATUS NetrDfsDeleteExitPoint(
     /* [string][in] */ WCHAR *Prefix,
     /* [in] */ unsigned long Type)
 {
+    osi_Log0(afsd_logp, "NetrDfsDeleteExitPoint not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1252,6 +1293,7 @@ NET_API_STATUS NetrDfsModifyPrefix(
     /* [in] */ GUID *Uid,
     /* [string][in] */ WCHAR *Prefix)
 {
+    osi_Log0(afsd_logp, "NetrDfsModifyPrefix not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1266,6 +1308,7 @@ NET_API_STATUS NetrDfsFixLocalVolume(
     /* [in] */ LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
     /* [in] */ unsigned long CreateDisposition)
 {
+    osi_Log0(afsd_logp, "NetrDfsFixLocalVolume not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1273,6 +1316,7 @@ NET_API_STATUS NetrDfsManagerReportSiteInfo(
     /* [unique][string][in] */ SRVSVC_HANDLE ServerName,
     /* [unique][out][in] */ LPDFS_SITELIST_INFO *ppSiteInfo)
 {
+    osi_Log0(afsd_logp, "NetrDfsManagerReportSiteInfo not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1281,6 +1325,7 @@ NET_API_STATUS NetrServerTransportDelEx(
     /* [in] */ DWORD Level,
     /* [switch_is][in] */ LPTRANSPORT_INFO Buffer)
 {
+    osi_Log0(afsd_logp, "NetrServerTransportDelEx not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1289,6 +1334,7 @@ NET_API_STATUS NetrServerAliasAdd(
     /* [in] */ DWORD Level,
     /* [switch_is][in] */ LPSERVER_ALIAS_INFO InfoStruct)
 {
+    osi_Log0(afsd_logp, "NetrServerAliasAdd not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1299,6 +1345,7 @@ NET_API_STATUS NetrServerAliasEnum(
     /* [out] */ LPDWORD TotalEntries,
     /* [unique][out][in] */ LPDWORD ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrServerAliasEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1307,6 +1354,7 @@ NET_API_STATUS NetrServerAliasDel(
     /* [in] */ DWORD Level,
     /* [switch_is][in] */ LPSERVER_ALIAS_INFO InfoStruct)
 {
+    osi_Log0(afsd_logp, "NetrServerAliasDel not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -1315,6 +1363,7 @@ NET_API_STATUS NetrShareDelEx(
     /* [in] */ DWORD Level,
     /* [switch_is][in] */ LPSHARE_INFO ShareInfo)
 {
+    osi_Log0(afsd_logp, "NetrShareDelEx not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
index 436fedb..7aca170 100644 (file)
@@ -25,6 +25,7 @@
 #include <windows.h>
 #include <lmcons.h>
 #include <stdlib.h>
+#include "afsd.h"
 #include "ms-wkssvc.h"
 #include "AFS_component_version_number.h"
 
@@ -37,6 +38,8 @@ unsigned long NetrWkstaGetInfo(
     /* [in] */ unsigned long Level,
     /* [switch_is][out] */ LPWKSTA_INFO WkstaInfo)
 {
+    osi_Log1(afsd_logp, "NetrWkstaGetInfo level %u", Level);
+
     /*
     * How much space do we need and do we have that much room?
     * For now, just assume we can return everything in one shot
@@ -75,6 +78,7 @@ unsigned long NetrWkstaSetInfo(
     /* [switch_is][in] */ LPWKSTA_INFO WkstaInfo,
     /* [unique][out][in] */ unsigned long *ErrorParameter)
 {
+    osi_Log0(afsd_logp, "NetrWkstaSetInfo not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -85,6 +89,7 @@ unsigned long NetrWkstaUserEnum(
     /* [out] */ unsigned long *TotalEntries,
     /* [unique][out][in] */ unsigned long *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrWkstaUserEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -95,6 +100,7 @@ unsigned long NetrWkstaTransportEnum(
     /* [out] */ unsigned long *TotalEntries,
     /* [unique][out][in] */ unsigned long *ResumeHandle)
 {
+    osi_Log0(afsd_logp, "NetrWkstaTransportEnum not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -104,6 +110,7 @@ unsigned long NetrWkstaTransportAdd(
     /* [in] */ LPWKSTA_TRANSPORT_INFO_0 TransportInfo,
     /* [unique][out][in] */ unsigned long *ErrorParameter)
 {
+    osi_Log0(afsd_logp, "NetrWkstaTransportAdd not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -112,6 +119,7 @@ unsigned long NetrWkstaTransportDel(
     /* [unique][string][in] */ wchar_t *TransportName,
     /* [in] */ unsigned long ForceLevel)
 {
+    osi_Log0(afsd_logp, "NetrWkstaTransportDel not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -122,6 +130,7 @@ unsigned long NetrWorkstationStatisticsGet(
     /* [in] */ unsigned long Options,
     /* [out] */ LPSTAT_WORKSTATION_0 *Buffer)
 {
+    osi_Log0(afsd_logp, "NetrWorkstationStatisticsGet not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -130,6 +139,7 @@ unsigned long NetrGetJoinInformation(
     /* [string][out][in] */ wchar_t **NameBuffer,
     /* [out] */ PNETSETUP_JOIN_STATUS BufferType)
 {
+    osi_Log0(afsd_logp, "NetrGetJoinInformation not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -142,6 +152,7 @@ unsigned long NetrJoinDomain2(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
     /* [in] */ unsigned long Options)
 {
+    osi_Log0(afsd_logp, "NetrJoinDomain2 not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -152,6 +163,7 @@ unsigned long NetrUnjoinDomain2(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
     /* [in] */ unsigned long Options)
 {
+    osi_Log0(afsd_logp, "NetrUnjoinDomain2 not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -163,6 +175,7 @@ unsigned long NetrRenameMachineInDomain2(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
     /* [in] */ unsigned long Options)
 {
+    osi_Log0(afsd_logp, "NetrRenameMachineInDomain2 not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -174,6 +187,7 @@ unsigned long NetrValidateName2(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
     /* [in] */ NETSETUP_NAME_TYPE NameType)
 {
+    osi_Log0(afsd_logp, "NetrValidateName2 not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -186,6 +200,7 @@ unsigned long NetrGetJoinableOUs2(
     /* [out][in] */ unsigned long *OUCount,
     /* [size_is][size_is][string][out] */ wchar_t ***OUs)
 {
+    osi_Log0(afsd_logp, "NetrGetJoinableOUs2 not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -197,6 +212,7 @@ unsigned long NetrAddAlternateComputerName(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
     /* [in] */ unsigned long Reserved)
 {
+    osi_Log0(afsd_logp, "NetrAddAlternateComputerName not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -208,6 +224,7 @@ unsigned long NetrRemoveAlternateComputerName(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
     /* [in] */ unsigned long Reserved)
 {
+    osi_Log0(afsd_logp, "NetrRemoveAlternateComputerName not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -219,6 +236,7 @@ unsigned long NetrSetPrimaryComputerName(
     /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
     /* [in] */ unsigned long Reserved)
 {
+    osi_Log0(afsd_logp, "NetrSetPrimaryComputerName not supported");
     return ERROR_NOT_SUPPORTED;
 }
 
@@ -228,6 +246,7 @@ unsigned long NetrEnumerateComputerNames(
     /* [in] */ unsigned long Reserved,
     /* [out] */ PNET_COMPUTER_NAME_ARRAY *ComputerNames)
 {
+    osi_Log0(afsd_logp, "NetrEnumerateComputerName not supported");
     return ERROR_NOT_SUPPORTED;
 }