base-files: add /etc/shadow to list of essential files to keep in sysupgrade (bug...
authorFelix Fietkau <nbd@openwrt.org>
Sat, 25 Oct 2014 17:23:14 +0000 (17:23 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 25 Oct 2014 17:23:14 +0000 (17:23 +0000)
commit7f8594f3a8ee36c478e7837763addf75eb294cf9
treecaf4eea28a26e7c9bae23b3ceff32dc5772225e2
parent7dc6dcd3e3834085a748b71a783a6441b72577b8
base-files: add /etc/shadow to list of essential files to keep in sysupgrade (bug 18206)

Based on bug #18206 sysupgrade can lead to loss of password information in
certain situations. Most likely all users who will upgrade from versions
r43017-43040, will lose their current passwords. :-(
https://dev.openwrt.org/ticket/18206

Currently /etc/shadow is defined as a conffile in base-files:
https://dev.openwrt.org/browser/trunk/package/base-files/Makefile#L37

But it is not defined in the default list of essential files to keep in
sysupgrade:
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/upgrade/keep.d/base-files-essential

If exporting conffiles info fails, /etc/shadow can get lost.

Shadow passwords are now the default, so saying that preserving /etc/passwd
is essential while /etc/shadow is not, makes no sense.

The attached patch adds /etc/shadow to the list of essential files.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Backport of r43061

SVN-Revision: 43062
package/base-files/files/lib/upgrade/keep.d/base-files-essential