summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c4
-rw-r--r--source3/smbd/server.c9
-rw-r--r--source3/smbd/uid.c4
3 files changed, 16 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index a38e6da683..420598157f 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -545,6 +545,10 @@ void process_smb(char *inbuf, char *outbuf)
int32 len = smb_len(inbuf);
int nread = len + 4;
+#ifdef WITH_PROFILE
+ profile_p->smb_count++;
+#endif
+
if (trans_num == 0) {
/* on the first packet, check the global hosts allow/ hosts
deny parameters before doing any parsing of the packet
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 9b397bcdeb..dcc53cb8d0 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -618,7 +618,14 @@ static void usage(char *pname)
return(-1);
init_structs();
-
+
+#ifdef WITH_PROFILE
+ if (!profile_setup(False)) {
+ DEBUG(0,("ERROR: failed to setup profiling\n"));
+ return -1;
+ }
+#endif
+
/*
* Set the machine NETBIOS name if not already
* set from the config file.
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index f76fa49d56..b2407ed5fc 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -109,6 +109,10 @@ static BOOL become_uid(uid_t uid)
current_user.uid = uid;
+#ifdef WITH_PROFILE
+ profile_p->uid_changes++;
+#endif
+
return(True);
}