summaryrefslogtreecommitdiff
path: root/minix/lib/libc/sys/fchown.c
blob: 19db6dd3a2d9eeb261747eee9d9cb39914b2d685 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>

#include <string.h>
#include <unistd.h>

#ifdef __weak_alias
__weak_alias(__posix_fchown, fchown)
#endif

int fchown(int fd, uid_t owner, gid_t grp)
{
  message m;

  memset(&m, 0, sizeof(m));
  m.m_lc_vfs_chown.fd = fd;
  m.m_lc_vfs_chown.owner = owner;
  m.m_lc_vfs_chown.group = grp;
  return(_syscall(VFS_PROC_NR, VFS_FCHOWN, &m));
}