deluser --backup fails because tar --no-unquote option should be used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adduser (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
deluser --backup --remove-home (or --remove-all-files) USER
aborts if it encounters certain file names, for example the ubiquitous
'C:\nppdf32Log\
The root cause is that 'tar' helpfully "interprets escape sequences" in its filename arguments, so file names containing a backslash followed by 'n' are changed to contain a newline character, and other similar cases.
The tar --no-unquote option prevents this. So 'deluser' should pass --no-unquote to 'tar' when creating the backup archive.
I'll attach a demo/regression
STEPS TO REPRODUCE:
1. touch '/home/
2. deluser --backup --remove-home testuser
RESULTS:
/bin/tar: /home/.
(deluser aborts without doing anything except creating an empty archive file)
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: adduser 3.113+nmu3ubuntu5
ProcVersionSign
Uname: Linux 4.13.0-19-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Dec 17 15:20:16 2017
InstallationDate: Installed on 2017-12-13 (4 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
PackageArchitec
SourcePackage: adduser
UpgradeStatus: No upgrade log present (probably fresh install)