[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] BusyBox and Minicom
From: Brent Baude <baude () chartermi ! net>
Date: 2004-03-28 15:43:35
Message-ID: 40671885.6030208 () chartermi ! net
[Download RAW message or body]
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
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic