From: Jag <ag...@li...> - 2002-05-29 18:20:38
|
On Wed, 2002-05-29 at 12:39, Daniel Widyono wrote: > #include <stdio.h> > #include <sys/bproc.h> > #include <pwd.h> > #include <sys/types.h> >=20 > main() { > struct passwd *pwent =3D getpwuid(0); > printf("%s\n",pwent->pw_name); > } >=20 >=20 > # bpsh 0 ./a.out > bpsh: Child process exited abnormally. >=20 >=20 > Same for getgrgid().=20 Check if pwent is NULL. Unless you managed to properlly setup all the nss stuff on the slave node, it won't be able to find the info for uid 0, and will thus return NULL, and your printf statement will likely cause a segfault. |