Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm installation removing all symlinks on update #133

Open
53c70r opened this issue Sep 10, 2020 · 1 comment
Open

rpm installation removing all symlinks on update #133

53c70r opened this issue Sep 10, 2020 · 1 comment

Comments

@53c70r
Copy link

53c70r commented Sep 10, 2020

Tested on but not limited to Fedora32(probably affecting all rpm related distros):
After installation symlinks to all binary files get set correct but after package update all symlinks will be deleted leaving all binary files in place without any references.

This results in unusable binaries from the terminal environment.

@VainlyStrain
Copy link

VainlyStrain commented Jun 6, 2021

I think I have found the issue: in the prerm script, all bins get removed, which is expected when uninstalling Metasploit. However, the prerm script of the old version gets invoked when upgrading, right at the end (after the postinstall script of the new version). So, the symlinks get successfully created, but deleted directly afterwards.

Upgrade log (F33):

Is this ok [y/N]: y
Downloading Packages:
metasploit-framework-6.0.48+20210606102536~1rapid7-1.el6.x86_64.rpm                      12 MB/s | 233 MB     00:19    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                    12 MB/s | 233 MB     00:19     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1 
  Running scriptlet: metasploit-framework-6.0.48+20210606102536~1rapid7-1.el6.x86_64                                1/2 
  Upgrading        : metasploit-framework-6.0.48+20210606102536~1rapid7-1.el6.x86_64                                1/2 
  Running scriptlet: metasploit-framework-6.0.48+20210606102536~1rapid7-1.el6.x86_64                                1/2 
Run msfconsole to get started
# here, the postinstall script finished, creating the symlinks

  Running scriptlet: metasploit-framework-6.0.48+20210604102544~1rapid7-1.el6.x86_64                                2/2 
  Cleanup          : metasploit-framework-6.0.48+20210604102544~1rapid7-1.el6.x86_64                                2/2 
# and here, they are removed again
  Running scriptlet: metasploit-framework-6.0.48+20210604102544~1rapid7-1.el6.x86_64                                2/2 
  Verifying        : metasploit-framework-6.0.48+20210606102536~1rapid7-1.el6.x86_64                                1/2 
  Verifying        : metasploit-framework-6.0.48+20210604102544~1rapid7-1.el6.x86_64                                2/2 

Upgraded:
  metasploit-framework-6.0.48+20210606102536~1rapid7-1.el6.x86_64                                                       

Complete!
┌─[vainlystrain@vainlystrain]─[~]
└──╼ $msf <TAB> <TAB>
msfbanner    msflisten    msfparallel  msfvpdate   # only self-made shortcut scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants