Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm and deb tasks incorrectly set the SGID permission #437

Closed
Zuplyx opened this issue Feb 19, 2024 · 0 comments · Fixed by #438
Closed

rpm and deb tasks incorrectly set the SGID permission #437

Zuplyx opened this issue Feb 19, 2024 · 0 comments · Fixed by #438

Comments

@Zuplyx
Copy link
Contributor

Zuplyx commented Feb 19, 2024

#429 introduced the Boolean property setgid for explicitly setting the SGID permission.
But in the rpm and deb CopyActions setgid is mistakenly evaluated as a String. Since in Groovy any non-empty String is coerced to true, this leads to the SGID being set even if setgid = false.

Currently the only way to not set the SGID is to set setgid = null.

Impacted Code:

String setgid = lookup(specToLookAt, 'setgid') ?: task.setgid
int fileMode = dirDetails.mode
if (setgid) {
fileMode = fileMode | 02000
}

String setgid = lookup(specToLookAt, 'setgid') ?: task.setgid
if (setgid) {
dirMode = dirMode | 02000
}

DanielThomas added a commit that referenced this issue Feb 19, 2024
Fix #437: Properly evaluate setgid property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant