Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: How did wine get this far?

  1. #11
    Join Date
    Jun 2008
    Location
    Delta Quadrant
    Posts
    1,441

    Default Re: How did wine get this far?

    >
    > *strangles people who use sudo*


    Ubuntu started the craze I think.

  2. #12
    Join Date
    Jul 2008
    Location
    Netherlands
    Posts
    26

    Default Re: How did wine get this far?

    Quote Originally Posted by Chrysantine View Post
    *strangles people who use sudo*

    su -c 'zypper in compat-libstdc++'
    Hmmmm shouldn't you use
    Code:
    su - -c ''
    so you load root's profile preventing you from accidentally running a version of zypper that is not in root's path?
    You'll never get a second change to eat your first herring

  3. #13
    Join Date
    Jul 2008
    Location
    Netherlands
    Posts
    26

    Default Re: How did wine get this far?

    sorry Chrysantine you are absolutely right.


    su -c does create a root shell and thus loads root's profile.
    sudo does not and therefore imposes an potential security risk.

    let me clarify for those who miss the point.

    try the following:

    start a terminal and do:
    Code:
    touch bin/cat
    chmod +x bin/cat
    cat /etc/fstab
    man su
    What happen??????
    We created a empty script cat that does absolutely nothing.
    when we now try to cat a file, as ~/bin comes first in a normal users PATH setting, nothing happens.

    when we try to read a man page the man system uses cat to pickup the correct file so therefore the man command fails.

    Now within the same session try:
    Code:
    su -c 'cat /etc/fstab'
    sudo 'cat /etc/fstab'
    You see, the users version of the cat program gets used by root. we obviously don't want this to happen as it imposes security and stability trouble.

    Thank you Chrysantine for pointing this out.
    You'll never get a second change to eat your first herring

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •