@@ -67,9 +67,9 @@ type UnprivilegedUser interface {
67
67
// same as DropToUnprivilegedUser() but UnprivilegedUser is only an optional outcome, the only thing
68
68
// guaranteed is PrivilegedWork. this means that:
69
69
//
70
- // - we definitely can elevate
71
- // - but we might not be running as unprivileged user (we were not run under '$ sudo' so we cannot
72
- // jump between unprivileged and privileged contexts)
70
+ // - we definitely can elevate
71
+ // - but we might not be running as unprivileged user (we were not run under '$ sudo' so we cannot
72
+ // jump between unprivileged and privileged contexts)
73
73
//
74
74
// WARNING: this alters global process state, so you shouldn't be doing anything concurrent.
75
75
// (at least where the different operations would be bothered by running in different security context)
@@ -170,13 +170,15 @@ func (r *runningUnderSudo) AsRoot(work func(ProofOfRunningAsRoot) error) error {
170
170
// this is useful for e.g. writing user's owned file on directory only root can write to.
171
171
//
172
172
// Running a process as root, before this function call (from /proc/self/status):
173
- // Uid: 0 0 0 0
174
173
//
175
- // (values are: "Real, effective, saved set, and filesystem UIDs")
176
- // https://man7.org/linux/man-pages/man5/proc.5.html
174
+ // Uid: 0 0 0 0
175
+ //
176
+ // (values are: "Real, effective, saved set, and filesystem UIDs")
177
+ // https://man7.org/linux/man-pages/man5/proc.5.html
177
178
//
178
179
// After this function call:
179
- // Uid: 0 1000 0 1000
180
+ //
181
+ // Uid: 0 1000 0 1000
180
182
//
181
183
// => makes changes to (drops privileges of):
182
184
// - Real : ☐
0 commit comments