2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include "namespace.h"
|
|
|
|
#include <lib.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2011-03-03 17:44:18 +01:00
|
|
|
#ifdef __weak_alias
|
|
|
|
__weak_alias(chown, _chown)
|
|
|
|
#endif
|
|
|
|
|
2011-02-17 18:11:09 +01:00
|
|
|
PUBLIC int chown(const char *name, uid_t owner, gid_t grp)
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.m1_i1 = strlen(name) + 1;
|
|
|
|
m.m1_i2 = owner;
|
|
|
|
m.m1_i3 = grp;
|
2011-11-28 11:07:55 +01:00
|
|
|
m.m1_p1 = (char *) __UNCONST(name);
|
2011-02-17 18:11:09 +01:00
|
|
|
return(_syscall(VFS_PROC_NR, CHOWN, &m));
|
|
|
|
}
|