mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-06 19:40:08 +02:00
🐛 Own /bin and /sbin folders specifically
This commit is contained in:
@ -61,16 +61,25 @@ class BrewPermissionFixer {
|
||||
? "php"
|
||||
: "php@\(formula)"
|
||||
|
||||
if isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/bin")
|
||||
|| isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/sbin") {
|
||||
let borked = DueOwnershipFormula(
|
||||
formula: realFormula,
|
||||
path: "\(Paths.optPath)/\(realFormula)"
|
||||
)
|
||||
let binFolderOwned = isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/bin")
|
||||
let sbinFolderOwned = isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/sbin")
|
||||
|
||||
if binFolderOwned || sbinFolderOwned {
|
||||
Log.warn("\(formula) is owned by root")
|
||||
|
||||
broken.append(borked)
|
||||
if binFolderOwned {
|
||||
broken.append(DueOwnershipFormula(
|
||||
formula: realFormula,
|
||||
path: "\(Paths.optPath)/\(realFormula)/bin"
|
||||
))
|
||||
}
|
||||
|
||||
if sbinFolderOwned {
|
||||
broken.append(DueOwnershipFormula(
|
||||
formula: realFormula,
|
||||
path: "\(Paths.optPath)/\(realFormula)/sbin"
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user