/[path-sandbox]/trunk/src/libsandbox.h
Gentoo

Contents of /trunk/src/libsandbox.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 223 - (show annotations) (download) (as text)
Mon Dec 5 11:24:20 2005 UTC (8 years, 7 months ago) by azarah
File MIME type: text/x-chdr
File size: 729 byte(s)
FreeBSD have RTLD_NOW, but still have the getcwd() issue.
1 /*
2 * Copyright (C) 2005 Martin Schlemmer <azarah@gentoo.org>,
3 * Distributed under the terms of the GNU General Public License, v2 or later
4 * Author: Martin Schlemmer <azarah@gentoo.org>
5 *
6 * $Header$
7 */
8
9 #ifndef __LIBSANDBOX_H__
10 #define __LIBSANDBOX_H__
11
12 #if !defined(OUTSIDE_LIBSANDBOX)
13 /* Need to disable sandbox, as on non-linux libc's, opendir() is
14 * used by some getcwd() implementations and resolves to the sandbox
15 * opendir() wrapper, causing infinit recursion and finially crashes.
16 */
17 extern int sandbox_on;
18 # define set_sandbox_on sandbox_on = 1
19 # define set_sandbox_off sandbox_on = 0
20 #else
21 # define set_sandbox_on
22 # define set_sandbox_off
23 #endif /* OUTSIDE_LIBSANDBOX */
24
25 #endif /* __LIBSANDBOX_H__ */

  ViewVC Help
Powered by ViewVC 1.1.20