fix configtest stalled with scanMode=fast-root (#1339)

* fix configtest stalled with scanMode=fast-root

* repoquery does not require sudo privileges on centos
This commit is contained in:
kurita0
2021-12-26 08:31:11 +09:00
committed by GitHub
parent 6bc4850596
commit 1eb5d36668
6 changed files with 6 additions and 8 deletions

View File

@@ -90,7 +90,7 @@ func (o *alma) sudoNoPasswdCmdsFastRoot() []cmd {
{"stat /proc/1/exe", exitStatusZero},
{"ls -l /proc/1/exe", exitStatusZero},
{"cat /proc/1/maps", exitStatusZero},
{"lsof -i -P", exitStatusZero},
{"lsof -i -P -n", exitStatusZero},
}
}
return []cmd{

View File

@@ -84,7 +84,7 @@ func (o *amazon) sudoNoPasswdCmdsFastRoot() []cmd {
{"stat /proc/1/exe", exitStatusZero},
{"ls -l /proc/1/exe", exitStatusZero},
{"cat /proc/1/maps", exitStatusZero},
{"lsof -i -P", exitStatusZero},
{"lsof -i -P -n", exitStatusZero},
}
}

View File

@@ -84,17 +84,15 @@ func (o *centos) sudoNoPasswdCmdsFast() []cmd {
func (o *centos) sudoNoPasswdCmdsFastRoot() []cmd {
if !o.ServerInfo.IsContainer() {
return []cmd{
{"repoquery -h", exitStatusZero},
{"needs-restarting", exitStatusZero},
{"which which", exitStatusZero},
{"stat /proc/1/exe", exitStatusZero},
{"ls -l /proc/1/exe", exitStatusZero},
{"cat /proc/1/maps", exitStatusZero},
{"lsof -i -P", exitStatusZero},
{"lsof -i -P -n", exitStatusZero},
}
}
return []cmd{
{"repoquery -h", exitStatusZero},
{"needs-restarting", exitStatusZero},
}
}

View File

@@ -139,7 +139,7 @@ func (o *debian) checkIfSudoNoPasswd() error {
"stat /proc/1/exe",
"ls -l /proc/1/exe",
"cat /proc/1/maps",
"lsof -i -P",
"lsof -i -P -n",
}
if !o.getServerInfo().Mode.IsOffline() {

View File

@@ -86,7 +86,7 @@ func (o *rhel) sudoNoPasswdCmdsFastRoot() []cmd {
{"stat /proc/1/exe", exitStatusZero},
{"ls -l /proc/1/exe", exitStatusZero},
{"cat /proc/1/maps", exitStatusZero},
{"lsof -i -P", exitStatusZero},
{"lsof -i -P -n", exitStatusZero},
}
}
return []cmd{

View File

@@ -90,7 +90,7 @@ func (o *rocky) sudoNoPasswdCmdsFastRoot() []cmd {
{"stat /proc/1/exe", exitStatusZero},
{"ls -l /proc/1/exe", exitStatusZero},
{"cat /proc/1/maps", exitStatusZero},
{"lsof -i -P", exitStatusZero},
{"lsof -i -P -n", exitStatusZero},
}
}
return []cmd{