]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/DaemonServer: log commands to cluster + audit logs
authorSage Weil <sage@redhat.com>
Tue, 14 Mar 2017 13:57:17 +0000 (09:57 -0400)
committerSage Weil <sage@redhat.com>
Wed, 29 Mar 2017 15:39:27 +0000 (11:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/DaemonServer.cc

index efd453d9051c1b8afbaa6856eb92e4f746844002..5237f93a5ed7d2012acd62f14ef0f2cea28ccfb6 100644 (file)
@@ -458,17 +458,19 @@ bool DaemonServer::handle_command(MCommand *m)
   if (!_allowed_command(session.get(), mgr_cmd->module, prefix, cmdmap,
                         param_str_map, mgr_cmd)) {
     dout(1) << __func__ << " access denied" << dendl;
-#if 0
-    // FIXME: audit_clog?
-    clog->info() << "from='" << session->addr << "' "
-                << "entity='" << session->entity_name << "' "
-                << "cmd=" << m->cmd << ":  access denied";
-#endif
+    audit_clog->info() << "from='" << session->inst << "' "
+                      << "entity='" << session->entity_name << "' "
+                      << "cmd=" << m->cmd << ":  access denied";
     ss << "access denied";
     r = -EACCES;
     goto out;
   }
 
+  audit_clog->debug()
+    << "from='" << session->inst << "' "
+    << "entity='" << session->entity_name << "' "
+    << "cmd=" << m->cmd << ": dispatch";
+
   // -----------
   // PG commands