summaryrefslogtreecommitdiffstats
path: root/source/lib/tallocmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/tallocmsg.c')
-rw-r--r--source/lib/tallocmsg.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/lib/tallocmsg.c b/source/lib/tallocmsg.c
index 8f03fd66ff1..b515093cd69 100644
--- a/source/lib/tallocmsg.c
+++ b/source/lib/tallocmsg.c
@@ -33,18 +33,23 @@
void msg_pool_usage(int msg_type, struct process_id src_pid,
void *UNUSED(buf), size_t UNUSED(len))
{
- off_t reply;
- fstring reply_str;
+ char *reply = NULL;
SMB_ASSERT(msg_type == MSG_REQ_POOL_USAGE);
DEBUG(2,("Got POOL_USAGE\n"));
- reply = talloc_total_size(NULL);
- fstr_sprintf(reply_str, "%ld", (long)reply);
+ reply = talloc_describe_all();
+ if (!reply) {
+ return;
+ }
+ become_root();
message_send_pid(src_pid, MSG_POOL_USAGE,
- reply_str, strlen(reply_str)+1, True);
+ reply, strlen(reply)+1, True);
+ unbecome_root();
+
+ SAFE_FREE(reply);
}
/**