Skip to content

Commit 798242e

Browse files
Merge branch 'main' into standalone-manifest-fix-state-path
2 parents f9eb56e + 5fe8deb commit 798242e

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+3-30
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ List here all the items you have verified BEFORE sending this PR. Please DO NOT
3636
- [ ] I have added an entry in `./changelog/fragments` using the [changelog tool](https://github.com/elastic/elastic-agent#changelog)
3737
- [ ] I have added an integration test or an E2E test
3838

39-
## Author's Checklist
40-
41-
<!-- Recommended
42-
Add a checklist of things that are required to be reviewed in order to have the PR approved
43-
-->
44-
- [ ]
45-
4639
## How to test this PR locally
4740

4841
<!-- Recommended
@@ -59,32 +52,12 @@ Link related issues below. Insert the issue link or reference after the word "Cl
5952
- Requires #123
6053
- Superseds #123
6154
-->
62-
-
63-
64-
## Use cases
65-
66-
<!-- Recommended
67-
Explain here the different behaviors that this PR introduces or modifies in this project, user roles, environment configuration, etc.
68-
69-
If you are familiar with Gherkin test scenarios, we recommend its usage: https://cucumber.io/docs/gherkin/reference/
70-
-->
71-
72-
## Screenshots
73-
74-
<!-- Optional
75-
Add here screenshots about how the project will be changed after the PR is applied. They could be related to web pages, terminal, etc, or any other image you consider important to be shared with the team.
76-
-->
77-
78-
## Logs
79-
80-
<!-- Recommended
81-
Paste here output logs discovered while creating this PR, such as stack traces or integration logs, or any other output you consider important to be shared with the team.
82-
-->
55+
-
8356

8457
## Questions to ask yourself
8558

86-
- How are we going to support this in production?
87-
- How are we going to measure its adoption?
59+
- How are we going to support this in production?
60+
- How are we going to measure its adoption?
8861
- How are we going to debug this?
8962
- What are the metrics I should take care of?
9063
- ...

internal/pkg/agent/install/user_windows.go

+6
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const (
3939
USER_UF_SCRIPT = 1
4040
USER_UF_NORMAL_ACCOUNT = 512
4141
USER_UF_DONT_EXPIRE_PASSWD = 65536
42+
43+
accountRightCreateSymbolicLink gowin32.AccountRightName = "SeCreateSymbolicLinkPrivilege"
4244
)
4345

4446
// FindGID returns the group's GID on the machine.
@@ -151,6 +153,10 @@ func CreateUser(name string, _ string) (string, error) {
151153
if err != nil {
152154
return "", fmt.Errorf("failed to set service logon: %w", err)
153155
}
156+
err = sp.AddAccountRight(sid, accountRightCreateSymbolicLink)
157+
if err != nil {
158+
return "", fmt.Errorf("failed to add right to create symbolic link: %w", err)
159+
}
154160

155161
return FindUID(name)
156162
}

0 commit comments

Comments
 (0)