-
Notifications
You must be signed in to change notification settings - Fork 153
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
Extension for a new privilege escalation credential field for targets in GMP #1535
Merged
timopollmeier
merged 12 commits into
greenbone:master
from
jhelmold:extend_gmp_for_escalation_credential
May 28, 2021
Merged
Extension for a new privilege escalation credential field for targets in GMP #1535
timopollmeier
merged 12 commits into
greenbone:master
from
jhelmold:extend_gmp_for_escalation_credential
May 28, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for the creation and modification of targets. In file gmp.c: Extended the structs create_target_data_t and modify_target_data_t and the enum client_state_t. Adjusted the functions gmp_xml_handle_start_element and gmp_xml_handle_end_element. Adjusted the function call of modify_target and create_target in gmp_xml_handle_end_element. In file manage_sql.c: Extended the functions create_target and modify_target with the new field ssh_elevate_credential and added the required functionality.
jhelmold
changed the title
Extension for a new previlige escalation credential field in GMP (creation and modification of targets)
Extension for a new previlige escalation credential field in GMP
May 25, 2021
Added documentation of the parameter ssh_elevate_credential at the call of create_target. Added documentation of the parameter ssh_elevate_credential_id at the call of modify_target.
jhelmold
force-pushed
the
extend_gmp_for_escalation_credential
branch
from
May 25, 2021 13:16
2eececd
to
a40fa21
Compare
in file gmp.c: Added the necessary data structures and code to get the new credential to the function handle_get_targets(). in manage_sql.c: Extended the TARGET_ITERATOR_COLUMNS and TARGET_ITERATOR_FILTER_COLUMNS for the new credential. Added the functions target_iterator_ssh_elevate_credential(), target_iterator_ssh_elevate_trash() and target_ssh_elevate_credential().
jhelmold
changed the title
Extension for a new previlige escalation credential field in GMP
Extension for a new privilege escalation credential field for targets in GMP
May 27, 2021
timopollmeier
requested changes
May 27, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be checks in the create_target and modify_target commands that reject
the SSH elevate credential if the main SSH credential is not defined.
Besides that I've found a few small mistakes in the whitespaces that I've added suggestion
comments for.
jhelmold
force-pushed
the
extend_gmp_for_escalation_credential
branch
from
May 28, 2021 09:15
480b42c
to
605b24c
Compare
in manage_sql.c: Added a check, if there is a ssh_credential when a ssh_elevate_credential is given, in the functions create_target() und modify_target(). If there is no ssh_credential an error code is returned. in gmp.c: Added the according error messages to the error messages sections behind the call of create_target() and modify_target().
in manage_sql.c: Adjusted and added the documentation of the return values concerned by the new SSH Elevate Credential in the Doxygen-comments of the functions create_target() and modify_target().
timopollmeier
approved these changes
May 28, 2021
timopollmeier
added a commit
that referenced
this pull request
Jun 2, 2021
Extension for a new privilege escalation credential field for targets in GMP (backport #1535)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
Extension for a new privilege escalation credential field for
targets in GMP. This step concerns the creation, modification and
the loading from the DB of targets.
Why:
A customer requested this new functionality
How did you test it:
Checklist: