/[path-sandbox]/trunk/libsandbox/wrapper-decls/chmod.c
Gentoo

Contents of /trunk/libsandbox/wrapper-decls/chmod.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 332 - (show annotations) (download) (as text)
Thu Jul 13 10:23:48 2006 UTC (6 years, 10 months ago) by azarah
File MIME type: text/x-csrc
File size: 1291 byte(s)
Split wrappers out to make modifying easier.

1 /*
2 * chmod.c
3 *
4 * chmod() wrapper.
5 *
6 * Copyright 1999-2006 Gentoo Foundation
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation version 2 of the License.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 * Partly Copyright (C) 1998-9 Pancrazio `Ezio' de Mauro <p@demauro.net>,
23 * as some of the InstallWatch code was used.
24 *
25 * $Header$
26 */
27
28
29 extern int EXTERN_NAME(const char *, mode_t);
30 static int (*WRAPPER_TRUE_NAME) (const char *, mode_t) = NULL;
31
32 int WRAPPER_NAME(const char *path, mode_t mode)
33 {
34 int result = -1;
35
36 if FUNCTION_SANDBOX_SAFE("chmod", path) {
37 check_dlsym(WRAPPER_TRUE_NAME, WRAPPER_SYMNAME,
38 WRAPPER_SYMVER);
39 result = WRAPPER_TRUE_NAME(path, mode);
40 }
41
42 return result;
43 }
44

  ViewVC Help
Powered by ViewVC 1.1.13