Public bug reported:

Variables on packages are messed up

The source package i found the bug in is attached, empty and designed
for this Bug Report only.

1)
j...@karmic:~$ lsb_release -a ; uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu karmic (development branch)
Release:        9.10
Codename:       karmic
Linux karmic 2.6.31-10-generic #34-Ubuntu SMP Wed Sep 16 00:23:19 UTC 2009 i686 
GNU/Linux

2) The version of the package iam using dont apply here, i build my own
for testing purposes, but it prooves the Bug.

3) What you expected to happen:
It works OK, using correct variables on bash scripts on the package.

4) What happened instead:
Variables are messed up installing packages,
In example, 
--when you install it using " sudo dpkg -i package.deb " the variable $HOME is 
/home/username , 
--when you install it using Karmic's gdebi (double clicking a .deb) the 
variable $HOME is /root 


j...@karmic:~$ echo $HOME
/home/juan
j...@karmic:~$ sudo echo $HOME
/home/juan

Double clicking a .deb package to install with Karmic's gdebi-gtk...

 Creating empty file /root/.local/test.txt . . . 
 OK
j...@karmic:~$ sudo dpkg -r empty-package4testing
Desinstalando empty-package4testing ...
  Removing empty file /home/juan/.local/test.txt . . . 
«/home/juan/.local/test.txt» borrado
 OK
j...@karmic:~$ sudo dpkg -i '/home/juan/empty-package4testing_1_all.deb' 
Desempaquetando empty-package4testing (de .../empty-package4testing_1_all.deb) 
...
Configurando empty-package4testing ...
  Creating empty file /home/juan/.local/test.txt . . . 
 OK
j...@karmic:~$


This is inconsistent and can bring up possible security problems due to 
superuser privileges.
Installing on Jaunty the variable $HOME is /home/username on dpkg and gdebi.
You can accidentanly do weird things on /root without any intention.

---The variable used is only an EXAMPLE, 
is the same with any other, $USER for example.

Sorry i dont have time to explain myself better, but i think doing it
quickly is more important.

** Affects: ubuntu
     Importance: Undecided
         Status: New


** Tags: bash karmic variable

-- 
Variables on packages are messed up
https://bugs.launchpad.net/bugs/432274
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to