This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Toolchain has UID dependency


Rod,

Please, keep the mailing CCed next time.
Also, 80-column wide is easier to read and reply to.

On Tuesday 29 June 2010 22:14:59 Rod Nussbaumer wrote:
> Yann E. MORIN wrote:
> > On Monday 28 June 2010 18:54:30 Rod Nussbaumer wrote:
> >> The toolchain seemed to build successfully on the Debian 5 build host.
> >> I tarred up the result, and unpacked it on a RHEL4 host, but at a
> >> different location in the filesystem (which I don't think should matter).
[--SNIP--]
> >> Gcc seems to work there, but only if run by the UID that built the
> >> toolchain on the Debian host, or as user 'root'. 
> > If a UID!=0 can't use the toolchain, UID==0 and original UID!=0 both can,
> > then it really smells like missing permissions by the new UID to access the toolchain.

OK, I just tried here, and It Works For Me (TM).
Steps:
- as UID/GID = 1000/1000, build a toolchain, into /tmp/toolchains/x-tools/(tuple)
- as root, mv /tmp/toolchains/x-tools/(tuple) /opt/x-tools/(tuple)
- as root, chown -R 2000:2000 /opt/x-tools
- as root, chmod -R ugo+rX-w /opt/x-tools
Now the toolchain belongs to UID/GID = 2000/2000, it is readable by everybody,
directories are 'listable', and executables are executable.

Now, with this trivial ess.c:
    #include <stdio.h>
    #include <stdlib.h>
    int main( int argc, char** argv ) {
        printf( "Hello, World!\n" );
        return 0;
    }

- as UID/GID=1001/1001: (tuple)-gcc ess.c -o ess
I properly get an execuable, gcc does not complain, whatever...

So: i build the toolchain with a UID/GID pair, install it as if it
belong to a second UID/GID pair, and run it as a third UID/GID pair.
There is no issue with that. I do it everyday.

[--SNIP--]
> > As root, try to run:
> >   chmod -R go+rX /usr1/local/support/Xtools/arm-unknown-linux-gnu
> > (or wherever you did move the toolchain to).
> Done. No change.

OK, this is turning weird... So, back to the drawing board...

Do you have some kind of policy enforcement on your RHEL4 box, such as
SELinux, and the policy forbids some users access to some paths.. (wild
guess here, I don't know nor use SELinux, nor any other policy kit).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]