/*
 * Copyright (C) 1999-2000 Wojciech Purczynski <wp@elzabsoft.pl>
 *
 * THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
 * IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
 * THE FREE SOFTWARE  FOUNDATION;  EITHER  VERSION 2 OF THE LICENSE, OR
 * (AT YOUR OPTION) ANY LATER VERSION.
 *
 * THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
 * BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED  WARRANTY OF
 * MERCHANTABILITY OR FITNESS  FOR A PARTICULAR  PURPOSE.  SEE THE
 * GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS.
 */

#ifndef _GLOBAL_H
#define _GLOBAL_H

#define NAME "capsel"
#define VERSION "v1.5.5"

#define CONFIG_FILE "/etc/capsel.conf"

#define BUFLEN 1024
#define LINELEN	1024
#define TMPLEN 1024

/* Code configuration */

/*
 * CAP_ROOT_ONLY
 * If defined capabilities are only set for processes with EUID=0 .
 */
#undef CAP_ROOT_ONLY

/*
 * USE_UIDCAP 
 * If defined new setuid semanthic will be used that allows not to clear 
 * all capability bits while dropping other privileges.
 */
#define USE_UIDCAP

/*
 * EXECVE_CAP_WORKAROUND
 * If defined new_execve uses workaround for kernels 2.1.x and 2.2.x that
 * doesn't have VFS support for capabilities and do_execve may return -EPERM
 * if caller doesn't have full capability set.
 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)) && \
    (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
#define EXECVE_CAP_WORKAROUND
#else
#undef EXECVE_CAP_WORKAROUND
#endif

#endif /* _GLOBAL_H */
