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

Return actionable error message when enrolling #6144

Merged
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1eb05ab
enhancement(4889): updated enroll command to reexec the command if th…
kaanyalti Nov 25, 2024
e39d270
enhancement(4889): added savepassword function
kaanyalti Nov 26, 2024
5c77aa9
enhancement(4889): removed user impersonation, implemented noop for w…
kaanyalti Nov 26, 2024
74b256f
enhancement(4889): added changelog
kaanyalti Nov 26, 2024
3cadda9
enhancement(4889): added windows implementation
kaanyalti Nov 26, 2024
93ba22c
enhancement(4889): added license headers
kaanyalti Nov 26, 2024
e150906
enhancement(4889): update test case to execute different commands bas…
kaanyalti Nov 27, 2024
999f7ae
enhancement(4889): ran mage clean
kaanyalti Nov 27, 2024
a1ef893
enhancement(4889): updated function name, updated integration tests
kaanyalti Dec 2, 2024
b26256c
enhancmenet(4889): updated function name
kaanyalti Dec 2, 2024
912e0b6
enhancement(4889): updated function name, fixed test assertions
kaanyalti Dec 2, 2024
df8b1bf
enhancement(4889): update error messages
kaanyalti Dec 5, 2024
50ac231
enhancement(4889): ran mage update
kaanyalti Dec 5, 2024
5c57d7d
enhancements(4889): fix integration test
kaanyalti Dec 5, 2024
adb6989
enhancement(4889): remove commented code
kaanyalti Dec 6, 2024
fc56d9f
enhancement(4889): commiting now, don't push though
kaanyalti Dec 6, 2024
4b77196
enhancement(4889): added windows unit test
kaanyalti Dec 6, 2024
cc07760
enhancement(4889): close test file
kaanyalti Dec 6, 2024
6492b43
enhancement(4889): updated isOwnerExec function, added tests
kaanyalti Dec 6, 2024
9243ae2
enchancement(4889): added log in test
kaanyalti Dec 6, 2024
729316a
enhancement(4889): remove unused types
kaanyalti Dec 6, 2024
06d62e1
enhancement(4889): added test for isOwnerExec for windows
kaanyalti Dec 6, 2024
c7a3a26
enhancement(4889): added unix tests, ran mage addLicenseHeaders
kaanyalti Dec 6, 2024
9c2fba8
enhancement(4889): added testisfileownerunix test
kaanyalti Dec 6, 2024
df5ddb7
enhancement(4889): added TestIsOwnerExecUnix test
kaanyalti Dec 6, 2024
0ab7181
enhancement(4889): updated test function name
kaanyalti Dec 6, 2024
5a3df58
enhancement(4889): set file ownership of the test file
kaanyalti Dec 6, 2024
e89e126
enhancement(4889): remove unnecessary change
kaanyalti Dec 6, 2024
9c67aea
enhancment(4889): updated iOwnerExec windows test
kaanyalti Dec 7, 2024
ab4e753
enhancement(4889): fix file creation in tests
kaanyalti Dec 7, 2024
1f66c83
Update internal/pkg/agent/cmd/enroll.go
kaanyalti Dec 11, 2024
8e05185
Update internal/pkg/agent/cmd/enroll_match_fileowner_windows.go
kaanyalti Dec 11, 2024
ffba277
Update internal/pkg/agent/cmd/enroll_match_fileowner_unix.go
kaanyalti Dec 11, 2024
81b3e60
enhancement(4889): updated summary and issue in changelog
kaanyalti Dec 11, 2024
f152fcc
enhancement(4889): updated variable name, wrap error when returning e…
kaanyalti Dec 11, 2024
f7a9367
enhancement(4889): added comments describing isOwnerExec. fixed type …
kaanyalti Dec 11, 2024
58b7e1e
enhancement(4889): refactored isOwnerExec return
kaanyalti Dec 11, 2024
4ef5ca7
enhancement(4889): differentiating between sid errors
kaanyalti Dec 11, 2024
65f6592
enhancment(4889): removed redundant unit tests
kaanyalti Dec 11, 2024
ce809c1
enhancement(4889): update command execution in integration tests
kaanyalti Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enhancement(4889): ran mage update
  • Loading branch information
kaanyalti committed Dec 18, 2024
commit 50ac2310123b813f22c6b92611b1cba12d666a57
3 changes: 2 additions & 1 deletion internal/pkg/agent/cmd/enroll_match_fileowner_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
"fmt"
"os"

"github.com/elastic/elastic-agent/internal/pkg/agent/errors"
"golang.org/x/sys/windows"

"github.com/elastic/elastic-agent/internal/pkg/agent/errors"
)

var UserOwnerMismatchError = errors.New("the command is executed as root but the program files are not owned by the root user.")
Expand Down