[BusyBox] BusyBox and Minicom
Brent Baude
baude at chartermi.net
Sun Mar 28 18:25:09 UTC 2004
Folks,
Here's what I did to circumvent the problems with busybox and minicom.
Sorry it took me a bit to dig up the file and send this mail.
In minicom.c, the problem seems to be coming from this little piece of
code which I commented out:
/*if ((pwd = getpwuid(real_uid)) == (struct passwd *)0) {
fputs(_("You don't exist. Go away. (in minicom.c)-- \n"), stderr);
exit(1);
}*/
Then I made a fake structure to replace what getpwuid would normally do:
struct passwd brentspwent;
char fakename[]="root";
char fakedir[] = "/root";
char fakeinit[] = "/bin/ash";
pwd = getpwuid(real_uid);
pwd=&brentspwent;
brentspwent.pw_uid=0;
brentspwent.pw_name=fakename;
brentspwent.pw_gid=0;
brentspwent.pw_shell=fakeinit;
brentspwent.pw_dir=fakedir;
Security isn't a problem for my use of busybox and minicom so this works
fine. It would be interesting to understand why getpwuid doesn't work
properly.
Regards,
Brent Baude
More information about the busybox
mailing list