Skip to content

Commit

Permalink
Correct select server table query
Browse files Browse the repository at this point in the history
  • Loading branch information
dantecatalfamo committed Jun 13, 2024
1 parent d13d1d1 commit 116d2f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/service/osquery_utils/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,13 @@ var mdmQueries = map[string]DetailQuery{
func discoveryTableAndServer(tableName string) string {
discoveryTableServerQuery := `
SELECT 1
FROM osquery_registry
WHERE active = true
AND registry = 'table'
AND name = '%s'
FROM osquery_registry o
INNER JOIN
(SELECT 1 FROM registry WHERE path = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallationType' AND data <> 'Server')
`
WHERE o.active = true
AND o.registry = 'table'
AND o.name = 'mdm_bridge'`

return fmt.Sprintf(discoveryTableServerQuery, tableName)
}

Expand Down

0 comments on commit 116d2f3

Please sign in to comment.