On Sun, Jan 16, 2005 at 10:02:49PM +0100, Stef Epardaud wrote:
> On Sun, Jan 16, 2005 at 07:03:30PM +0100, Sjoerd Simons wrote:
> > The socket opening stuff is something your nisbindings do, not a dbus thing.
> > Could you trace the daemon with ltrace and provide the last part of the
> > output.
>
> Ok, thanks for the quick reply, here goes:
>
> memmove(0x809bc9d, 0x809bc98, 0, 0x80903d0, 0) = 0x809bc9d
> memcpy(0x809bc98, "BEGIN", 5) = 0x809bc98
> memmove(0x8091360, 0x8091365, 2, 0x80903d0, 0x809ba00) = 0x8091360
> memmove(0x8091360, 0x8091362, 0, 0x80903d0, 0x809ba00) = 0x8091360
> free(0x8093cf8) = <void>
> free(0x809bc98) = <void>
> calloc(24, 1) = 0x8093c38
> getpwuid(1000, 0xb7f9f620, 1, 0xbfffed18, 0xb7ee0014) = 0xb7f9fe9c
> strlen("stephane") = 8
> malloc(9) = 0x8093cf8
> memcpy(0x8093cf8, "stephane", 9) = 0x8093cf8
> strlen("/home/stephane") = 14
> malloc(15) = 0x809bc98
> memcpy(0x809bc98, "/home/stephane", 15) = 0x809bc98
> malloc(68) = 0x8094310
> getgrouplist(0x8093cf8, 1000, 0x8094310, 0xbfffed08, 0xb7ee0014 <unfinished
> ...>
> --- SIGSEGV (Segmentation fault) ---
> +++ killed by SIGSEGV +++
>
> that's the last part, if you want what's before (and there's quite a few),
> do tell :)
Hrm, it crashes inside the getgrouplist call, odd..
>
> > Your the first to give someusefull feedback :) Getting no feedback is also
> > very frustrating..
>
> Oh don't worry I'll give you all the info I can, thanks a lot for the help!
Cool.. Could you try to run the attached program as user messagebus (or as your
normal user, should have the same result)
Sjoerd
--
An anthropologist at Tulane has just come back from a field trip to New
Guinea with reports of a tribe so primitive that they have Tide but not
new Tide with lemon-fresh Borax.
-- David Letterman
#include <stdio.h>
#include <stdlib.h>
#include <grp.h>
int main() {
int i, ng = 17;
char *user = "stephane"; /* username here */
gid_t g = 1000;
gid_t *groups = NULL;
groups = malloc(ng * sizeof(gid_t));
if (getgrouplist(user, g, groups, &ng) < 0) {
realloc(groups, ng * sizeof (gid_t));
getgrouplist(user, g, groups, &ng);
}
for(i = 0; i < ng; i++)
printf("%d\n", groups[i]);
return 0;
}