-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BannedEapiCommand: add some extra user/group commands
Add some commands which should never be called in ebuild to the banned list. Signed-off-by: Arthur Zamarin <[email protected]>
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "0", "line": "dohtml doc/*", "lineno": 9, "command": "dohtml", "eapi": "7"} | ||
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "1", "line": "has_version --host-root stub/stub1", "lineno": 9, "command": "has_version --host-root", "eapi": "7"} | ||
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "1", "line": "best_version --host-root stub/stub1:2", "lineno": 12, "command": "best_version --host-root", "eapi": "7"} | ||
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "2", "line": "usermod -s /bin/bash uucp", "lineno": 9, "command": "usermod", "eapi": "6"} | ||
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "2", "line": "usermod -s /bin/false uucp", "lineno": 13, "command": "usermod", "eapi": "6"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
testdata/repos/standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
EAPI=6 | ||
|
||
DESCRIPTION="Ebuild using banned commands" | ||
HOMEPAGE="https://github.com/pkgcore/pkgcheck" | ||
SLOT="0" | ||
LICENSE="BSD" | ||
|
||
pkg_preinst() { | ||
usermod -s /bin/bash uucp || die | ||
} | ||
|
||
pkg_postrm() { | ||
usermod -s /bin/false uucp || die | ||
} |