/*
 * chown.c
 */


#include<sys/types.h>
#include<sys/stat.h>

#include<callgate.h>
#include<errno.h>
#include<string.h>
#include<stdio.h>
#include<fcntl.h>
#include<time.h>


extern int chattr(const char*,int,int);


int chown(const char *path, uid_t owner, gid_t group)
{
	int rest=0;


	if((int)owner!=-1)
		rest=chattr(path,CHATTR_UID,(int)owner);
	if((int)group!=-1)
		rest=chattr(path,CHATTR_GID,(int)group);

	return rest;
}
