system service: unset NOTIFY_SOCKET

Unset the NOTIFY_SOCKET environment variable after sending the MAIN_PID
and READY message.  This avoids any unintentional side-effects of other
code paths using the socket assuming they'd run in a non-server
short-lived Podman process.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-08-16 15:07:25 +02:00
parent 60e58f0594
commit 7a94f8c123
35 changed files with 1690 additions and 300 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
"os"
"runtime"
"strings"
"time"
@ -592,6 +593,9 @@ func (r *Runtime) copySingleImageFromRegistry(ctx context.Context, imageName str
return nil
}
if socketPath, ok := os.LookupEnv("NOTIFY_SOCKET"); ok {
options.extendTimeoutSocket = socketPath
}
c, err := r.newCopier(&options.CopyOptions)
if err != nil {
return nil, err