Skip to content

Commit

Permalink
fix(installer): Prevent agent or installer remote uninstall (#33351)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteFoy authored Jan 24, 2025
1 parent 7b02f8f commit 6e72819
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/fleet/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ func (d *daemonImpl) handleRemoteAPIRequest(request remoteAPIRequest) (err error

case methodUninstallPackage:
log.Infof("Installer: Received remote request %s to uninstall package %s", request.ID, request.Package)
if request.Package == "datadog-installer" || request.Package == "datadog-agent" {
log.Infof("Installer: Can't uninstall the package %s", request.Package)
return nil
}
return d.remove(ctx, request.Package)

case methodStartExperiment:
Expand Down

0 comments on commit 6e72819

Please sign in to comment.