bool TraceSvcJrd::changeFlags(ULONG id, int setFlags, int clearFlags) { ConfigStorage* storage = TraceManager::getStorage(); StorageGuard guard(storage); storage->restart(); TraceSession session(*getDefaultMemoryPool()); while (storage->getNextSession(session)) { if (id != session.ses_id) continue; if (m_admin || m_user == session.ses_user) { const int saveFlags = session.ses_flags; session.ses_flags |= setFlags; session.ses_flags &= ~clearFlags; if (saveFlags != session.ses_flags) { storage->updateSession(session); } return true; } m_svc.printf(false, "No permissions to change other user trace session\n"); return false; } m_svc.printf(false, "Trace session ID %d not found\n", id); return false; }