[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] busybox chown/chgrp breaks with uclibc on MIPS
From: "Joseph Chiu" <josephc () idealab ! com>
Date: 2002-05-23 22:40:44
[Download RAW message or body]
Hi,
This is on the MIPS platform. I built a shared-uclibc busybox 0.60.3 with
uclibc top-of-CVS.
busybox chown dies with a segfault.
A small test program that calls chown, linked against the uclibc works.
Busybox chown compiled against glibc works.
It looks like the static initialization of chown_func in chown.c is not
getting done correctly:
in (unmodified) chown.c there is:
static int (*chown_func)(const char *, __uid_t, __gid_t) = chown;
I added this printf to fileAction() to see what’s going on:
+ printf (“calling chown %p %p %p l with %s %d %d”, chown_func, chown,
lchown, fileName, uid, gid);
When I run it:
# ./busybox chown 0 /tmp/x
calling chown 0x40410 0x2ab379c0 0x2ab337c0 l with /tmp/x 0 -1
Segmentation fault
If I modify chown_main, it works:
int chown_main(int argc, char **argv)
{
[.....]
show_usage();
}
}
+ chown_func = chown;
if (noderefFlag) chown_func = lchown;
# ./busybox chown 0 /tmp/x
calling chown 0x2ab379c0 0x2ab379c0 0x2ab337c0 l with /tmp/x 0 -1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic