|
From: | David Stuart |
Subject: | Re: problem with getgrgid when using "gcc -static" |
Date: | Sun, 29 Sep 2002 15:03:31 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020605 |
Interesting, two follow up questions, though...When I boot from my 7.2 "rescue" disk, I am able to do the same thing, but it works (i.e. the "-static" run reports "users" for the group). Does this make sense?
Also, could this possibly affect another program (like rpm, for instance)? Zack Weinberg wrote:
On Sun, Sep 29, 2002 at 12:58:21PM -0400, David Stuart wrote:address@hidden C]$ gcc foo.c -o foo address@hidden C]$ ./foo uid: 500 gid: 100 group=users Everything works fine. But, when I do this: address@hidden C]$ gcc -static foo.c -o foo address@hidden C]$ ./foo uid: 500 gid: 100 group=(null)Statically linking the program makes it unable to load the 'name service switch' modules which look up the group name. Don't statically link programs that need to use any of the getXXbyYY or getXXid routines. zw
[Prev in Thread] | Current Thread | [Next in Thread] |