• Bug#865144: libc-bin: /etc/nsswitch.conf is always updated on upgrades

    From Santiago Vila@21:1/5 to All on Mon Jun 19 19:50:02 2017
    XPost: linux.debian.bugs.dist

    This message is in MIME format. The first part should be readable text,
    while the remaining parts are likely unreadable without MIME-aware tools.

    Package: libc-bin
    Version: 2.24-11+deb9u1
    Tags: patch

    Hello Aurelien et al.

    As the subject says, the file /etc/nsswitch.conf is always updated to
    the current default on upgrades when it is already the default.

    This makes the file to have a different mtime without need,
    which is bad for people using tripwire/samhain/etc.

    We introduced this bug one year ago, when we moved the file from
    base-files:

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827105

    I can think of at least three ways to fix it, which I append
    to this report:

    In the first patch, we only modify the file if it's really different.
    This is what base-files did for ages and what I initially proposed in
    the patch for libc-bin (the bug was introduced by removing the cmp part).

    In the second patch, we do consider the md5sum of the current default,
    but we just return in such case, so the file is not updated.
    This is probably the cleanest patch.

    In the third patch, similar to the first one, we just don't check
    the md5sum for the current default, and we fall back to the case
    where the file has been modified.


    I understand that this is not a big problem, but it is otherwise
    trivial to fix (and it is formally a regression), so please consider
    fixing this in the next upload for stretch, if there is one.

    Thanks a lot.
    LS0tIGEvZGViaWFuL2RlYmhlbHBlci5pbi9saWJjLWJpbi5wb3N0aW5zdA0K KysrIGIvZGViaWFuL2RlYmhlbHBlci5pbi9saWJjLWJpbi5wb3N0aW5zdA0K QEAgLTMyLDggKzMyLDEwIEBAIHVwZGF0ZV90b19jdXJyZW50X2RlZmF1bHQo KSB7DQogICAgICAgICByZXR1cm4NCiAgICAgICAgIDs7DQogICAgIGVzYWMN Ci0gICAgZWNobyAiVXBkYXRpbmcgJDIgdG8gY3VycmVudCBkZWZhdWx0LiIN Ci0gICAgY3AgLXAgJDEgJDINCisgICAgaWYgISBjbXAgLXMgJDEgJDI7IHRo ZW4NCisgICAgICBlY2hvICJVcGRhdGluZyAkMiB0byBjdXJyZW50IGRlZmF1 bHQuIg0KKyAgICAgIGNwIC1wICQxICQyDQorICA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