hpc / mpifileutils

File utilities designed for scalability and performance.
https://hpc.github.io/mpifileutils
BSD 3-Clause "New" or "Revised" License
162 stars 64 forks source link

dcp: call setgroups before setuid #569

Closed daltonbohning closed 3 months ago

daltonbohning commented 4 months ago

When giving up privileges, setgroups should be called before setuid and/or setgid to avoid permission leaks.

Resolves #567

daltonbohning commented 4 months ago

Need to run this through our linter to see if the problem is resolved.

daltonbohning commented 4 months ago

@bdevcich @adammoody This does resolve an RPM lint issue we were seeing. Do you see any functional problem with this?

ofaaland commented 4 months ago

@daltonbohning I think Elsa is who you need for your review, Adam has a new gig these days, so I added her as reviewer. Looks good to me, but I'm not on the list of reviewers.

ofaaland commented 4 months ago

Thanks for submitting the patch!

bdevcich commented 4 months ago

Thanks for catching this. LGTM.

daltonbohning commented 4 months ago

Thanks @ofaaland!

daltonbohning commented 3 months ago

@ofaaland Do you have contact info for @gonsie or do you know if it's okay for me to merge this myself? I do have permissions to merge, but I'm not sure what the process is :) I can be reached at dalton.bohning@intel.com