Closing this as invalid. The analysis is flawed, the configuration file is created by user _apt, not root, the call is literally just mkstemp() with the path given in the error message, or rather a template, so there is no bug in apt here.
It's more likely to be wrong permissions on /tmp preventing the _apt user from creating files.
Closing this as invalid. The analysis is flawed, the configuration file is created by user _apt, not root, the call is literally just mkstemp() with the path given in the error message, or rather a template, so there is no bug in apt here.
It's more likely to be wrong permissions on /tmp preventing the _apt user from creating files.