Bug 1880945 - authselect create-profile may create broken symlinks
Summary: authselect create-profile may create broken symlinks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: authselect
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Březina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-21 08:22 UTC by Villy Kruse
Modified: 2020-12-10 01:13 UTC (History)
2 users (show)

Fixed In Version: authselect-1.2.2-1.fc33
Clone Of:
Environment:
Last Closed: 2020-12-10 01:13:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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