Bug 18812 - 6_s1:bssh-askpass ssh-askpass dangling links
Summary: 6_s1:bssh-askpass ssh-askpass dangling links
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 13:13 CEST by Bit Twister
Modified: 2016-11-01 11:48 CET (History)
2 users (show)

See Also:
Source RPM: openssh-askpass-qt4-1.0.1-12.mga6.x86_64
CVE:
Status comment:


Attachments

Description Bit Twister 2016-06-28 13:13:08 CEST
Description of problem:

The following are the dangling links: 
/etc/alternatives/bssh-askpass -> /usr/lib64/ssh/qt4-ssh-askpass 
/etc/alternatives/ssh-askpass -> /usr/lib64/ssh/qt4-ssh-askpass 
/usr/bin/ssh-askpass -> /etc/alternatives/bssh-askpass 
/usr/lib64/ssh/ssh-askpass -> /etc/alternatives/ssh-askpass 

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


How reproducible:


Steps to Reproduce:
8. su - root
9. urpmi symlinks
10. apply all updates, then run
11. symlinks -r / | grep dangling
Comment 1 Johnny A. Solbu 2016-06-28 23:36:21 CEST
Do you have openssh-askpass-qt4 installed?

urpmf /usr/lib64/ssh/qt4-ssh-askpass
openssh-askpass-qt4:/usr/lib64/ssh/qt4-ssh-askpass

CC: (none) => cooker

Comment 2 Bit Twister 2016-06-29 00:13:07 CEST
(In reply to Johnny A. Solbu from comment #1)
> Do you have openssh-askpass-qt4 installed?
> 
> urpmf /usr/lib64/ssh/qt4-ssh-askpass
> openssh-askpass-qt4:/usr/lib64/ssh/qt4-ssh-askpass

Well, that works pretty good on release 5. Not so much on release 6
# urpmf /usr/lib64/ssh/qt4-ssh-askpass
#


Then there is these snippets from my update log

installing
    31/36: openssh-askpass-qt4   ##########################
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass


##############################################
      4/5: removing openssh-askpass-qt4-1.0.1-9.mga6.x86_64
                                 ###########################################################################
Comment 3 Raphael Gertz 2016-06-29 05:19:36 CEST
Fixed upgrade problems in version openssh-askpass-qt4-1.0.1-11.mga6.x86_64.rpm

Please make sure to revert to unmodified version the files : /etc/profile.d/90ssh-askpass.{sh,csh}.

Their content should be like that :
export SSH_ASKPASS=/usr/libexec/openssh/ssh-askpass

Best regards.

Status: NEW => RESOLVED
CC: (none) => mageia
Resolution: (none) => FIXED

Comment 4 Bit Twister 2016-06-29 10:38:49 CEST
Deleted all dangling links. Results of latest updates:

installing openssh-askpass-qt4-1.0.1-11.mga6.x86_64.rpm from /var/cache/urpmi/rpms
     1/1: removing openssh-askpass-qt4-1.0.1-10.mga6.x86_64
 Updating locate database

Checking for dangling links


The following are the dangling links: 
/etc/alternatives/bssh-askpass -> /usr/lib64/ssh/qt4-ssh-askpass 
/usr/bin/ssh-askpass -> /etc/alternatives/bssh-askpass

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)
Summary: 6_s1: bssh-askpass ssh-askpass ssh-askpass ssh-askpass dangling links => 6_s1:bssh-askpass ssh-askpass dangling links
Source RPM: openssh-askpass-qt4-1.0.1-10.mga6.x86_64 => openssh-askpass-qt4-1.0.1-11.mga6.x86_64

Comment 5 Raphael Gertz 2016-06-29 12:56:39 CEST
What is the content of :
/var/lib/alternatives/ssh-askpass
and
/var/lib/alternatives/bssh-askpass

I duno how you did but, but please run by hand :
update-alternatives --remove ssh-askpass /lib/lib64/ssh/qt4-ssh-askpass
update-alternatives --remove bssh-askpass /lib/lib64/ssh/qt4-ssh-askpass

I added in version openssh-askpass-qt4-1.0.1-11.mga6.x86_64.rpm %post script to remove theses alternatives on upgrade.

What is the result of rpm -qa | grep askpass ?
Comment 6 Johnny A. Solbu 2016-06-29 13:28:58 CEST
(In reply to Raphael Gertz from comment #3)
> Fixed upgrade problems in version
> openssh-askpass-qt4-1.0.1-11.mga6.x86_64.rpm
> 
> Please make sure to revert to unmodified version the files :
> /etc/profile.d/90ssh-askpass.{sh,csh}.
> 
> Their content should be like that :
> export SSH_ASKPASS=/usr/libexec/openssh/ssh-askpass

But the profile scripts are still wrong. Nothing provides the file the script points to.

(13:25:45) [root@cauldron ~]# urpmf -f /usr/libexec/openssh/ssh-askpass
(13:27:09) [root@cauldron ~]# 

LC_ALL=C ls -lh /usr/libexec/openssh/ssh-askpass
ls: cannot access '/usr/libexec/openssh/ssh-askpass': No such file or directory

So how could that path in the profile scripts be correct?
Comment 7 Raphael Gertz 2016-06-29 13:49:34 CEST
Did you install (openssh-askpass-qt4|openssh-askpass-gnome) ?

This file is provided throught alternative files !

/usr/libexec/openssh/ssh-askpass -> /etc/alternatives/ssh-askpass
/etc/alternatives/ssh-askpass -> /usr/libexec/openssh/qt4-ssh-askpass

Same for /usr/bin/ssh-askpass.

I close as fixed, just make sure you upgrade or remove completely the packages and the files :
/var/lib/alternatives/bssh-askpass /var/lib/alternatives/ssh-askpass

I can't support unclean configurations.

I tested by installing mga5 package and then upgrade to 6 version it works, nothing more to do here.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED

Comment 8 Bit Twister 2016-06-29 17:33:58 CEST
(In reply to Raphael Gertz from comment #5)
> What is the content of :
> /var/lib/alternatives/ssh-askpass
> and
> /var/lib/alternatives/bssh-askpass

# dir /var/lib/alternatives/ssh-askpass
-rw-r--r-- 1 root root 111 Jun 16 12:38 /var/lib/alternatives/ssh-askpass

# dir /var/lib/alternatives/bssh-askpass
-rw-r--r-- 1 root root 185 Jun 29 03:28 /var/lib/alternatives/bssh-askpass

> I duno how you did but, 

I had a clean Cauldron/mga6 network install plus updates and deleted all dangling links, then installed your update.

$ but please run by hand :
> update-alternatives --remove ssh-askpass /lib/lib64/ssh/qt4-ssh-askpass
> update-alternatives --remove bssh-askpass /lib/lib64/ssh/qt4-ssh-askpass

# update-alternatives --remove ssh-askpass /lib/lib64/ssh/qt4-ssh-askpass
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
# update-alternatives --remove bssh-askpass /lib/lib64/ssh/qt4-ssh-askpass
failed to read link /usr/bin/ssh-askpass: No such file or directory


> I added in version openssh-askpass-qt4-1.0.1-11.mga6.x86_64.rpm %post script
> to remove theses alternatives on upgrade.

Yup, saw that

installing openssh-askpass-qt4-1.0.1-11.mga6.x86_64.rpm from /var/cache/urpmi/rpms
Preparing...                     #############
      1/1: openssh-askpass-qt4   ##############
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
failed to read link /usr/bin/ssh-askpass: No such file or directory
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass
failed to read link /usr/bin/ssh-askpass: No such file or directory
      1/1: removing openssh-askpass-qt4-1.0.1-10.mga6.x86_64
                                 ###################################


> What is the result of rpm -qa | grep askpass ?

# rpm -qa | grep askpass 
openssh-askpass-qt4-1.0.1-11.mga6
openssh-askpass-7.2p2-2.mga6
openssh-askpass-common-7.2p2-2.mga6

> I can't support unclean configurations.

But this happened on a clean install.

> I tested by installing mga5 package and then upgrade to 6 version it works, > > nothing more to do here.

Too bad you did not try your package on a running release 6.
Mine was a clean network install on Jun 16 18:59 with both Plasma and Gnome desktop environments.

Result, ls -al /usr/bin/ssh-askpass
ls: cannot access '/usr/bin/ssh-askpass': No such file or directory

If /usr/bin/ssh-askpass is supposed to work, I need a workaround.

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 9 Bit Twister 2016-06-29 20:44:27 CEST
Deleted all dangling links

Installing mageia-release-common-6-0.14.mga6.x86_64.rpm openssh-askpass-qt4-1.0.1-12.mga6.x86_64.rpm <snip>

     5/5: openssh-askpass-qt4   #####################
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
failed to read link /usr/bin/ssh-askpass: No such file or directory
failed to read link /usr/lib64/ssh/ssh-askpass: No such file or directory
the primary link for ssh-askpass must be /usr/lib64/ssh/ssh-askpass
failed to read link /usr/bin/ssh-askpass: No such file or directory
      1/5: removing mageia-release-Default-6-0.13.mga6.x86_64
 
dangling: /etc/alternatives/bssh-askpass -> /usr/lib64/ssh/qt4-ssh-askpass
dangling: /usr/bin/ssh-askpass -> /etc/alternatives/bssh-askpass

        # Found dangling links Wed 29 Jun 13:39 2016 using
        symlinks -r / | grep dangling

Source RPM: openssh-askpass-qt4-1.0.1-11.mga6.x86_64 => openssh-askpass-qt4-1.0.1-12.mga6.x86_64

Samuel Verschelde 2016-10-31 15:13:38 CET

Assignee: bugsquad => pkg-bugs

Comment 10 Raphael Gertz 2016-10-31 15:58:55 CET
This is useless for me :
# dir /var/lib/alternatives/ssh-askpass
-rw-r--r-- 1 root root 111 Jun 16 12:38 /var/lib/alternatives/ssh-askpass

# dir /var/lib/alternatives/bssh-askpass
-rw-r--r-- 1 root root 185 Jun 29 03:28 /var/lib/alternatives/bssh-askpass

I need the content of both thoses files.

I tested on a mageia fresh 6 cooker and upgrade from mga5.

Those alternatives files contains other alternative values for /etc/alternatives/bssh-askpass and /etc/alternatives/ssh-askpass created by other package.

Please provide the content of (cat) :
/var/lib/alternatives/ssh-askpass
/var/lib/alternatives/bssh-askpass

And rpm -qa | sort
Comment 11 Bit Twister 2016-11-01 11:48:29 CET
(In reply to Raphael Gertz from comment #10)
> This is useless for me :
> # dir /var/lib/alternatives/ssh-askpass
> -rw-r--r-- 1 root root 111 Jun 16 12:38 /var/lib/alternatives/ssh-askpass
> 
> # dir /var/lib/alternatives/bssh-askpass
> -rw-r--r-- 1 root root 185 Jun 29 03:28 /var/lib/alternatives/bssh-askpass
> 
> I need the content of both thoses files.

For what it's worth, a file pointing to a dangling link has no contents because the target link does not exist.

In plain language file with a dangling link has no contents.

> I tested on a mageia fresh 6 cooker and upgrade from mga5.
> 
> Those alternatives files contains other alternative values for
> /etc/alternatives/bssh-askpass and /etc/alternatives/ssh-askpass created by
> other package.

Ok, that does not surprise me. There have been a few changes since I posted 2016-06-29 and guessing your test on 2016-10-31

I have just completed a clean network install this morning and the only dangling links are found in bug 15785

Closing this bug and will open a new one if the next openssh-askpass update creates any dangles.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


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