Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add agent files from wazuh/wazuh #23

Merged
merged 10,000 commits into from
Jul 9, 2024
Merged

Add agent files from wazuh/wazuh #23

merged 10,000 commits into from
Jul 9, 2024

Conversation

TomasTurina
Copy link
Member

Description

This PR migrates all agents files from wazuh/wazuh repository.

Besides, the new structure is applied to every module and common library.

mjcr99 and others added 30 commits May 22, 2024 17:16
In order to succesfuly downgrade to earlier versions of Wazuh, we need
to restore ownership of files to the ossec group and user.

RPM may also backup the client.keys file, making it impossible for the
agent to reconnect, for this reason we try to restore this backup of
the client.keys if none is found.
The removal of a previous installed pacakge can result in the ossec
group and user being deleted, leaving files orphaned.

Some of these files are needed to be owned by Wazuh to guarantee
the agent connection.
In soeme cases the service lingers and doesn't respond to more graceful attempts.

We then try kill the process if previous attempts didn't work.
This works fine with newer versions of Wazuh that follow the same paths structure.

Older versions (ones with ossec group and user) require that we restore that expected
paths and ownership.
Code to rename folders has been moved to postrm.
The motivation behind this addition of messages is to have
more information if a installation using pkg packages fails.
… need to reflect this on wazuh packages as well to find the correct script.
All WPKs are now built using OS specific packages instead of sources,
hence there is no longer need to compile the Linux sources.
The packing of the wpk file is not architecture dependent, it depends solely on the type of package (rpm, deb, msi, pkg, etc...)
WPKs will now only support packages, dropping compilation from sources.
These are no longer necessary since the removal of the compilation from
sources in WPKs.
No compilation is made now for WPKs,
rendering those dockerfiles unnecessary.
Selutario and others added 14 commits June 11, 2024 18:47
…place-on-translations

Implementing version regex in translations
…rollment

Corrections on conf and replacing timeout like agentd enrollment test
…w-os-check-issues

Update os check issue template
…ations_algorithm

Improve translations performance with filter
@TomasTurina TomasTurina self-assigned this Jul 2, 2024
@TomasTurina TomasTurina linked an issue Jul 2, 2024 that may be closed by this pull request
@TomasTurina TomasTurina marked this pull request as ready for review July 5, 2024 20:29
@TomasTurina TomasTurina requested a review from vikman90 July 5, 2024 20:29
Copy link
Member

@vikman90 vikman90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @TomasTurina! We just need to do a few changes:

  • Convention: all files/directories with _ instead of -.
  • Move common/c-utils/* to common.
  • Move all .h and .hpp files into an include folder.
  • Move all .cpp and .c files into a src folder.
  • Avoid all tests that are failing.

@sdvendramini
Copy link
Member

LGTM!

@vikman90 vikman90 merged commit 3895d9d into master Jul 9, 2024
3 checks passed
@vikman90 vikman90 deleted the 7-add-agent-files branch July 9, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate steps to separate agent from manager