preinst writes to /root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
As part of my sandboxed APT I noticed that the package failed to install as it was trying to write to /root.
/root is a user directory, not a system one, which may not even exist because the administrator changed it to like /home/root, for example, and we definitely should not be writing system files in user directories.
Preparing to unpack .../16-
mkdir: cannot create directory ‘/root/
cp: cannot create directory '/root/
dpkg: error processing archive /tmp/apt-
new network-manager package pre-installation script subprocess returned error exit status 1
Related branches
- Sebastien Bacher: Approve
- Łukasz Zemczak: Approve
-
Diff: 55 lines (+19/-3)3 files modifieddebian/changelog (+12/-0)
debian/network-manager.postinst (+4/-1)
debian/network-manager.preinst (+3/-2)
Thanks, Julian.
This behavior was introduced by the netplan integration where we create a backup of the existing network manager connections. I'll look for a better place to store the backups.