source: trunk/src/emx/src/lib/misc/chown.c@ 1519

Last change on this file since 1519 was 1519, checked in by bird, 21 years ago

Big path handling change. Fixed wrong file headers. A new api or two. A bit of restructuring. And hopefully no new bug :-)

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/* $Id: chown.c 1519 2004-09-27 02:15:07Z bird $ */
2/** @file
3 *
4 * chown()
5 *
6 * Copyright (c) 2004 knut st. osmundsen <[email protected]>
7 *
8 *
9 * This file is part of InnoTek LIBC.
10 *
11 * InnoTek LIBC is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published
13 * by the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * InnoTek LIBC is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with InnoTek LIBC; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 *
25 */
26
27
28
29/*******************************************************************************
30* Header Files *
31*******************************************************************************/
32#include "libc-alias.h"
33#include <unistd.h>
34#include <sys/stat.h>
35#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_IO
36#include <InnoTekLIBC/logstrict.h>
37
38
39
40/**
41 * Change the owner and group over a file.
42 *
43 * This is stub. It only validates the path and returns without changing anything.
44 *
45 * @returns 0 on success.
46 * @returns -1 and errno on failure.
47 * @param path Path to the file to change owner/group of.
48 * @param owner Owner id.
49 * @param group Group id.
50 */
51int _STD(chown)(const char *path, uid_t owner, gid_t group)
52{
53 LIBCLOG_ENTER("path=%p:{%s} owner=%d group=%d\n", (void *)path, path, owner, group);
54 struct stat st;
55 int rc = stat(path, &st);
56 LIBCLOG_RETURN_INT(rc);
57}
58
Note: See TracBrowser for help on using the repository browser.