evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / go / google-guest-agent / disable-etc-mutation.patch
blobfe076baacd20ec7596d39ab723bcefcd8832ad1b
1 From 2e8060f9ade13ba18ae5930c0781227bfcce11a5 Mon Sep 17 00:00:00 2001
2 From: Nikolay Amiantov <ab@fmap.me>
3 Date: Mon, 10 Jan 2022 22:16:38 +0300
4 Subject: [PATCH] Disable accounts setup phase and oslogin
6 On NixOS we set up necessary groups and sudoers rules declaratively,
7 and have most of `/etc` directory read-only. This creates (harmless)
8 error messages when trying to create google-sudoers file.
10 "oslogin" daemon sets up configuration necessary for OS Login to
11 work, including PAM, NSS and sudoers. On NixOS we perform all this
12 configuration declaratively and have most of /etc mounted read-only.
13 This creates (harmless) error messages when running the daemon.
14 ---
15 google_guest_agent/non_windows_accounts.go | 9 ---------
16 google_guest_agent/oslogin.go | 2 +-
17 2 files changed, 1 insertion(+), 10 deletions(-)
19 diff --git a/google_guest_agent/non_windows_accounts.go b/google_guest_agent/non_windows_accounts.go
20 index 81013e3..05b830f 100644
21 --- a/google_guest_agent/non_windows_accounts.go
22 +++ b/google_guest_agent/non_windows_accounts.go
23 @@ -104,15 +104,6 @@ func (a *accountsMgr) set() error {
24 sshKeys = make(map[string][]string)
27 - logger.Debugf("create sudoers file if needed")
28 - if err := createSudoersFile(); err != nil {
29 - logger.Errorf("Error creating google-sudoers file: %v.", err)
30 - }
31 - logger.Debugf("create sudoers group if needed")
32 - if err := createSudoersGroup(); err != nil {
33 - logger.Errorf("Error creating google-sudoers group: %v.", err)
34 - }
36 mdkeys := newMetadata.Instance.Attributes.SSHKeys
37 if !newMetadata.Instance.Attributes.BlockProjectKeys {
38 mdkeys = append(mdkeys, newMetadata.Project.Attributes.SSHKeys...)
39 diff --git a/google_guest_agent/oslogin.go b/google_guest_agent/oslogin.go
40 index d05f733..980e84c 100644
41 --- a/google_guest_agent/oslogin.go
42 +++ b/google_guest_agent/oslogin.go
43 @@ -76,7 +76,7 @@ func (o *osloginMgr) timeout() bool {
46 func (o *osloginMgr) disabled(os string) bool {
47 - return os == "windows"
48 + return true
51 func (o *osloginMgr) set() error {
52 --
53 2.34.1