aboutsummaryrefslogtreecommitdiff
blob: cc736fd9f6237446cf1525c9042968b7c015308d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * rmdir.c
 *
 * rmdir() wrapper.
 *
 * Copyright 1999-2008 Gentoo Foundation
 * Licensed under the GPL-2
 */

extern int EXTERN_NAME(const char *);
static int (*WRAPPER_TRUE_NAME) (const char *) = NULL;

int WRAPPER_NAME(const char *pathname)
{
	int result = -1;

	if FUNCTION_SANDBOX_SAFE("rmdir", pathname) {
		check_dlsym(WRAPPER_TRUE_NAME, WRAPPER_SYMNAME,
			    WRAPPER_SYMVER);
		result = WRAPPER_TRUE_NAME(pathname);
	}

	return result;
}