This pull request is not sufficient to fix the problem. For one there is no
io.open in rpm's lua so far. Also we probably do not want random scriptlets to
mess with with the file descriptors of the rpm process. So this would need some
kind of protection (as we already added to exec and exit).
It might need to be a bit more complex, though, as permitting file operations
only after forking is kinda strange.
Also your proposed script relies on io.open("/dev/null") returning 2 as it
assumes that this is the lowest free file descriptor. This is really ugly and
probably unreliable. A proper solution would be to use dup2 (also not
available).
---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/44#issuecomment-176179051
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint