File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,12 @@ func runningFromSystemService() (ret bool, err error) {
122
122
errno := C .my_sd_pid_get_owner_uid (sd_pid_get_owner_uid , 0 , & uid )
123
123
serrno := syscall .Errno (- errno )
124
124
// when we're running from a unit file, sd_pid_get_owner_uid returns
125
- // ENOENT (systemd <220) or ENXIO (systemd >=220)
125
+ // ENOENT (systemd <220), ENXIO (systemd 220-223), or ENODATA
126
+ // (systemd >=234)
126
127
switch {
127
128
case errno >= 0 :
128
129
ret = false
129
- case serrno == syscall .ENOENT , serrno == syscall .ENXIO :
130
+ case serrno == syscall .ENOENT , serrno == syscall .ENXIO , serrno == syscall . ENODATA :
130
131
// Since the implementation of sessions in systemd relies on
131
132
// the `pam_systemd` module, using the sd_pid_get_owner_uid
132
133
// heuristic alone can result in false positives if that module
You can’t perform that action at this time.
0 commit comments