Bug 1880945

Summary: authselect create-profile may create broken symlinks
Product: [Fedora] Fedora Reporter: Villy Kruse <ppywlkiqletw>
Component: authselectAssignee: Pavel Březina <pbrezina>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: jhrozek, pbrezina
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: authselect-1.2.2-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-10 01:13:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Villy Kruse 2020-09-21 08:22:11 UTC
Description of problem:

When running

  authselect create-profile testprofile --base-on=minimal --symlink-meta --symlink-nsswitch --symlink-pam --symlink-dconf

the new profile contains broken symbolic links.

Version-Release number of selected component (if applicable):

authselect-1.2.1-1.fc32.x86_64

How reproducible:

Always

Steps to Reproduce:
1.  see above
2.
3.

Actual results:

/etc/authselect/custom/testprofile/:                 directory
/etc/authselect/custom/testprofile/REQUIREMENTS:     symbolic link to /usr/share/authselect/default/minimal/REQUIREMENTS
/etc/authselect/custom/testprofile/dconf-db:         broken symbolic link to /usr/share/authselect/default/minimal/dconf-db
/etc/authselect/custom/testprofile/smartcard-auth:   broken symbolic link to /usr/share/authselect/default/minimal/smartcard-
auth
/etc/authselect/custom/testprofile/fingerprint-auth: broken symbolic link to /usr/share/authselect/default/minimal/fingerprin
t-auth
/etc/authselect/custom/testprofile/README:           symbolic link to /usr/share/authselect/default/minimal/README
/etc/authselect/custom/testprofile/nsswitch.conf:    symbolic link to /usr/share/authselect/default/minimal/nsswitch.conf
/etc/authselect/custom/testprofile/password-auth:    symbolic link to /usr/share/authselect/default/minimal/password-auth
/etc/authselect/custom/testprofile/dconf-locks:      broken symbolic link to /usr/share/authselect/default/minimal/dconf-lock
s
/etc/authselect/custom/testprofile/system-auth:      symbolic link to /usr/share/authselect/default/minimal/system-auth
/etc/authselect/custom/testprofile/postlogin:        symbolic link to /usr/share/authselect/default/minimal/postlogin


Expected results:

No symbolic link is created for non-existing target.

Additional info:

Comment 1 Pavel Březina 2020-10-01 11:07:47 UTC
I believe the intention was to create symlinks even for a non-existent file for a situation where the base profile would get the file in the future thus un-breaking the link.

Comment 2 Villy Kruse 2020-10-01 12:10:44 UTC
(In reply to Pavel Březina from comment #1)
> I believe the intention was to create symlinks even for a non-existent file
> for a situation where the base profile would get the file in the future thus
> un-breaking the link.

In that case, creating these file as empty file makes things look nicer.

 /usr/share/authselect/default/minimal/dconf-db
 /usr/share/authselect/default/minimal/smartcard-auth
 /usr/share/authselect/default/minimal/fingerprint-auth
 /usr/share/authselect/default/minimal/dconf-locks

Comment 3 Pavel Březina 2020-11-18 13:38:14 UTC
Upstream PR:
https://github.com/authselect/authselect/pull/230

Comment 4 Pavel Březina 2020-11-25 09:43:19 UTC
* `master`
  * 02a085d1fbfc8c36a21730e547962e933f322263 - lib: do not create symlink to non-existent files when creating new profile

Comment 5 Fedora Update System 2020-11-30 10:56:42 UTC
FEDORA-2020-cf99202fdc has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-cf99202fdc

Comment 6 Fedora Update System 2020-12-01 02:13:42 UTC
FEDORA-2020-cf99202fdc has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-cf99202fdc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-cf99202fdc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-12-10 01:13:31 UTC
FEDORA-2020-cf99202fdc has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.