RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1655594 - created backup may contain unexpected strings at the end of file
Summary: created backup may contain unexpected strings at the end of file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: authselect
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Pavel Březina
QA Contact: Steeve Goveas
URL:
Whiteboard:
Depends On: 1655025
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-03 14:04 UTC by Pavel Březina
Modified: 2019-06-14 02:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1655025
Environment:
Last Closed: 2019-06-14 02:03:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Březina 2018-12-03 14:04:34 UTC
+++ This bug was initially created as a clone of Bug #1655025 +++

Due to a buffer error, created backups may contain unexpected strings at the end of backed up file.

How to reproduce:
$ sudo bin/authselect select sssd --force
Backup stored at /dev/shm/install/var/lib/authselect/backups/2018-11-30-10-54-59.33ajk7
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.

$ sudo cat /dev/shm/install/var/lib/authselect/backups/2018-11-30-10-54-59.33ajk7/nsswitch.conf
-> the output may contain unexpected string at the end of file

--- Additional comment from Pavel Březina on 2018-11-30 06:08:41 EST ---

Upstream ticket:
https://github.com/pbrezina/authselect/issues/123

Comment 2 shridhar 2019-01-08 09:24:20 UTC
verified with   sssd-2.0.0-32.el8.x86_64

[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/nsswitch.conf
#

    /etc/nsswitch.conf
    #
    An example Name Service Switch config file. This file should be
    sorted with the most-used services at the beginning.
    #
    The entry '[NOTFOUND=return]' means that the search for an
    entry should stop if the search in the previous entry turned
    up nothing. Note that if the search failed due to some other reason
    (like no NIS server responding) then the search continues with the
    next entry.
    #
    Valid entries include:
    #
    nisplus Use NIS+ (NIS version 3)
    nis Use NIS (NIS version 2), also called YP
    dns Use DNS (Domain Name Service)
    files Use the local files in /etc
    db Use the pre-processed /var/db files
    compat Use /etc files plus *_compat pseudo-databases
    hesiod Use Hesiod (DNS) for user lookups
    sss Use sssd (System Security Services Daemon)
    [NOTFOUND=return] Stop searching if not found so far
    #
    'sssd' performs its own 'files'-based caching, so it should
    generally come before 'files'.

    To use 'db', install the nss_db package, and put the 'db' in front
    of 'files' for entries you want to be looked up first in the
    databases, like this:
    #
    passwd: db files
    shadow: db files
    group: db files

passwd: sss files systemd
shadow: files sss
group: sss files systemd

hosts: files dns myhostname

bootparams: files

ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files sss

netgroup: sss

publickey: files

automount: files sss
aliases: files
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/fingerprint-auth
#%PAM-1.0

    This file is auto-generated.
    User changes will be destroyed the next time authselect is run.
    auth required pam_env.so
    auth sufficient pam_fprintd.so
    auth required pam_deny.so

account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so

password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/password-auth
#%PAM-1.0

    This file is auto-generated.
    User changes will be destroyed the next time authselect is run.
    auth required pam_env.so
    auth sufficient pam_unix.so try_first_pass nullok
    auth required pam_deny.so

account required pam_unix.so

password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password sufficient pam_unix.so try_first_pass use_authtok nullok sha512 shadow
password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/smartcard-auth
#%PAM-1.0

    This file is auto-generated.
    User changes will be destroyed the next time authselect is run.
    auth required pam_env.so
    auth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card
    auth required pam_deny.so

account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so

password optional pam_pkcs11.so

session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/
fingerprint-auth nsswitch.conf password-auth postlogin smartcard-auth system-auth
[root@auto-hv-02-guest07 ~]# cat /var/lib/authselect/backups/2018-12-31-07-50-59.LBivPx/system-auth
#%PAM-1.0

    This file is auto-generated.
    User changes will be destroyed the next time authselect is run.
    auth required pam_env.so
    auth sufficient pam_unix.so try_first_pass nullok
    auth required pam_deny.so

account required pam_unix.so

password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password sufficient pam_unix.so try_first_pass use_authtok nullok sha512 shadow
password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so


Note You need to log in before you can comment on or make changes to this bug.