Avoid using a leading underbar in defines as they are reserved in
ISO C.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#ifndef _SUDO_CONFIG_H
|
||||
#define _SUDO_CONFIG_H
|
||||
#ifndef SUDO_CONFIG_H
|
||||
#define SUDO_CONFIG_H
|
||||
|
||||
/* Define to 1 if the `syslog' function returns a non-zero int to denote
|
||||
failure. */
|
||||
@@ -1211,4 +1211,4 @@
|
||||
# define BSD_COMP
|
||||
#endif /* __svr4__ */
|
||||
|
||||
#endif /* _SUDO_CONFIG_H */
|
||||
#endif /* SUDO_CONFIG_H */
|
||||
|
@@ -4336,12 +4336,12 @@ AH_TEMPLATE(HAVE___NSS_XBYY_BUF_ALLOC, [Define to 1 if you have the `__nss_XbyY_
|
||||
dnl
|
||||
dnl Bits to copy verbatim into config.h.in
|
||||
dnl
|
||||
AH_TOP([#ifndef _SUDO_CONFIG_H
|
||||
#define _SUDO_CONFIG_H])
|
||||
AH_TOP([#ifndef SUDO_CONFIG_H
|
||||
#define SUDO_CONFIG_H])
|
||||
|
||||
AH_BOTTOM([/* BSD compatibility on some SVR4 systems. */
|
||||
#ifdef __svr4__
|
||||
# define BSD_COMP
|
||||
#endif /* __svr4__ */
|
||||
|
||||
#endif /* _SUDO_CONFIG_H */])
|
||||
#endif /* SUDO_CONFIG_H */])
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _COMPAT_ENDIAN_H
|
||||
#define _COMPAT_ENDIAN_H
|
||||
#ifndef COMPAT_ENDIAN_H
|
||||
#define COMPAT_ENDIAN_H
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
# undef LITTLE_ENDIAN
|
||||
@@ -69,4 +69,4 @@
|
||||
# endif
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#endif /* _COMPAT_ENDIAN_H */
|
||||
#endif /* COMPAT_ENDIAN_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
#define _FNMATCH_H
|
||||
#ifndef COMPAT_FNMATCH_H
|
||||
#define COMPAT_FNMATCH_H
|
||||
|
||||
#define FNM_NOMATCH 1 /* String does not match pattern */
|
||||
|
||||
@@ -29,4 +29,4 @@ __dso_public int sudo_fnmatch(const char *pattern, const char *string, int flags
|
||||
|
||||
#define fnmatch(_a, _b, _c) sudo_fnmatch((_a), (_b), (_c))
|
||||
|
||||
#endif /* _FNMATCH_H */
|
||||
#endif /* COMPAT_FNMATCH_H */
|
||||
|
@@ -20,8 +20,8 @@
|
||||
* work.
|
||||
*/
|
||||
|
||||
#ifndef _COMPAT_GETADDRINFO_H
|
||||
#define _COMPAT_GETADDRINFO_H
|
||||
#ifndef COMPAT_GETADDRINFO_H
|
||||
#define COMPAT_GETADDRINFO_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -80,4 +80,4 @@ __dso_public const char *sudo_gai_strerror(int ecode);
|
||||
#define gai_strerror(_a) sudo_gai_strerror((_a))
|
||||
|
||||
#endif /* !HAVE_GETADDRINFO */
|
||||
#endif /* _COMPAT_GETADDRINFO_H */
|
||||
#endif /* COMPAT_GETADDRINFO_H */
|
||||
|
@@ -31,8 +31,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_GETOPT_H_
|
||||
#define _SUDO_GETOPT_H_
|
||||
#ifndef COMPAT_GETOPT_H
|
||||
#define COMPAT_GETOPT_H
|
||||
|
||||
/*
|
||||
* GNU-like getopt_long()/getopt_long_only() with 4.4BSD optreset extension.
|
||||
@@ -78,4 +78,4 @@ extern int optind;
|
||||
extern int optopt;
|
||||
extern int optreset;
|
||||
|
||||
#endif /* !_SUDO_GETOPT_H_ */
|
||||
#endif /* !COMPAT_GETOPT_H */
|
||||
|
@@ -32,8 +32,8 @@
|
||||
* @(#)glob.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _GLOB_H_
|
||||
#define _GLOB_H_
|
||||
#ifndef COMPAT_GLOB_H
|
||||
#define COMPAT_GLOB_H
|
||||
|
||||
struct stat;
|
||||
typedef struct {
|
||||
@@ -73,4 +73,4 @@ __dso_public void sudo_globfree(glob_t *);
|
||||
#define glob(_a, _b, _c, _d) sudo_glob((_a), (_b), (_c), (_d))
|
||||
#define globfree(_a) sudo_globfree((_a))
|
||||
|
||||
#endif /* !_GLOB_H_ */
|
||||
#endif /* !COMPAT_GLOB_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _COMPAT_NSS_DBDEFS_H
|
||||
#define _COMPAT_NSS_DBDEFS_H
|
||||
#ifndef COMPAT_NSS_DBDEFS_H
|
||||
#define COMPAT_NSS_DBDEFS_H
|
||||
|
||||
/*
|
||||
* Bits of nss_dbdefs.h and nss_common.h needed to implement
|
||||
@@ -103,4 +103,4 @@ extern nss_status_t nss_search(nss_db_root_t *, nss_db_initf_t, int, void *);
|
||||
extern nss_XbyY_buf_t *_nss_XbyY_buf_alloc(int, int);
|
||||
extern void _nss_XbyY_buf_free(nss_XbyY_buf_t *);
|
||||
|
||||
#endif /* _COMPAT_NSS_DBDEFS_H */
|
||||
#endif /* COMPAT_NSS_DBDEFS_H */
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* by Steve Reid and Wei Dai respectively.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_SHA2_H
|
||||
#define _SUDOERS_SHA2_H
|
||||
#ifndef COMPAT_SHA2_H
|
||||
#define COMPAT_SHA2_H
|
||||
|
||||
#define SHA224_BLOCK_LENGTH 64
|
||||
#define SHA224_DIGEST_LENGTH 28
|
||||
@@ -95,4 +95,4 @@ __dso_public void sudo_SHA512Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA2_CT
|
||||
#define SHA512Update sudo_SHA512Update
|
||||
#define SHA512Final sudo_SHA512Final
|
||||
|
||||
#endif /* _SUDOERS_SHA2_H */
|
||||
#endif /* COMPAT_SHA2_H */
|
||||
|
@@ -5,8 +5,8 @@
|
||||
* Public domain.
|
||||
*/
|
||||
|
||||
#ifndef _COMPAT_STDBOOL_H_
|
||||
#define _COMPAT_STDBOOL_H_
|
||||
#ifndef COMPAT_STDBOOL_H
|
||||
#define COMPAT_STDBOOL_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
@@ -41,4 +41,4 @@ typedef enum {
|
||||
/* Inform that everything is fine */
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif /* _COMPAT_STDBOOL_H_ */
|
||||
#endif /* COMPAT_STDBOOL_H */
|
||||
|
@@ -14,12 +14,12 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_TIMESPEC_H
|
||||
#define _SUDO_TIMESPEC_H
|
||||
#ifndef COMPAT_TIMESPEC_H
|
||||
#define COMPAT_TIMESPEC_H
|
||||
|
||||
struct timespec {
|
||||
time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
|
||||
#endif /* _SUDO_TIMESPEC_H */
|
||||
#endif /* COMPAT_TIMESPEC_H */
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_ALLOC_H
|
||||
#define _SUDO_ALLOC_H
|
||||
#ifndef SUDO_ALLOC_H
|
||||
#define SUDO_ALLOC_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -45,4 +45,4 @@ __dso_public char *sudo_estrndup_v1(const char *src, size_t maxlen) __malloc_lik
|
||||
#define sudo_estrdup(_a) sudo_estrdup_v1((_a))
|
||||
#define sudo_estrndup(_a, _b) sudo_estrndup_v1((_a), (_b))
|
||||
|
||||
#endif /* _SUDO_ALLOC_H */
|
||||
#endif /* SUDO_ALLOC_H */
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_COMPAT_H
|
||||
#define _SUDO_COMPAT_H
|
||||
#ifndef SUDO_COMPAT_H
|
||||
#define SUDO_COMPAT_H
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef STDC_HEADERS
|
||||
@@ -464,7 +464,7 @@ __dso_public int sudo_sig2str(int signo, char *signame);
|
||||
# undef sig2str
|
||||
# define sig2str(_a, _b) sudo_sig2str((_a), (_b))
|
||||
#endif /* HAVE_SIG2STR */
|
||||
#if !defined(HAVE_INET_NTOP) && defined(_SUDO_NET_IFS_C)
|
||||
#if !defined(HAVE_INET_NTOP) && defined(SUDO_NET_IFS_C)
|
||||
__dso_public char *sudo_inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
||||
# undef inet_ntop
|
||||
# define inet_ntop(_a, _b, _c, _d) sudo_inet_ntop((_a), (_b), (_c), (_d))
|
||||
@@ -485,4 +485,4 @@ __dso_public void *sudo_reallocarray(void *ptr, size_t nmemb, size_t size);
|
||||
# define reallocarray(_a, _b, _c) sudo_reallocarray((_a), (_b), (_c))
|
||||
#endif /* HAVE_REALLOCARRAY */
|
||||
|
||||
#endif /* _SUDO_COMPAT_H */
|
||||
#endif /* SUDO_COMPAT_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_CONF_H
|
||||
#define _SUDO_CONF_H
|
||||
#ifndef SUDO_CONF_H
|
||||
#define SUDO_CONF_H
|
||||
|
||||
#include "sudo_queue.h"
|
||||
|
||||
@@ -78,4 +78,4 @@ __dso_public int sudo_conf_max_groups_v1(void);
|
||||
#define sudo_conf_group_source() sudo_conf_group_source_v1()
|
||||
#define sudo_conf_max_groups() sudo_conf_max_groups_v1()
|
||||
|
||||
#endif /* _SUDO_CONF_H */
|
||||
#endif /* SUDO_CONF_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_DEBUG_H
|
||||
#define _SUDO_DEBUG_H
|
||||
#ifndef SUDO_DEBUG_H
|
||||
#define SUDO_DEBUG_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
@@ -273,4 +273,4 @@ __dso_public void sudo_debug_write2_v1(int fd, const char *func, const char *fil
|
||||
#define sudo_debug_vprintf2(_a, _b, _c, _d, _e, _f) sudo_debug_vprintf2_v1((_a), (_b), (_c), (_d), (_e), (_f))
|
||||
#define sudo_debug_write2(_a, _b, _c, _d, _e, _f, _g) sudo_debug_write2_v1((_a), (_b), (_c), (_d), (_e), (_f), (_g))
|
||||
|
||||
#endif /* _SUDO_DEBUG_H */
|
||||
#endif /* SUDO_DEBUG_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_DSO_H
|
||||
#define _SUDO_DSO_H
|
||||
#ifndef SUDO_DSO_H
|
||||
#define SUDO_DSO_H
|
||||
|
||||
/* Values for sudo_dso_load() mode. */
|
||||
#define SUDO_DSO_LAZY 0x1
|
||||
@@ -52,4 +52,4 @@ __dso_public void sudo_dso_preload_table_v1(struct sudo_preload_table *table);
|
||||
#define sudo_dso_load(_a, _b) sudo_dso_load_v1((_a), (_b))
|
||||
#define sudo_dso_preload_table(_a) sudo_dso_preload_table_v1((_a))
|
||||
|
||||
#endif /* _SUDO_DSO_H */
|
||||
#endif /* SUDO_DSO_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_EVENT_H
|
||||
#define _SUDO_EVENT_H
|
||||
#ifndef SUDO_EVENT_H
|
||||
#define SUDO_EVENT_H
|
||||
|
||||
#include "sudo_queue.h"
|
||||
|
||||
@@ -160,4 +160,4 @@ int sudo_ev_add_impl(struct sudo_event_base *base, struct sudo_event *ev);
|
||||
int sudo_ev_del_impl(struct sudo_event_base *base, struct sudo_event *ev);
|
||||
int sudo_ev_scan_impl(struct sudo_event_base *base, int flags);
|
||||
|
||||
#endif /* _SUDO_EVENT_H */
|
||||
#endif /* SUDO_EVENT_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_FATAL_H_
|
||||
#define _SUDO_FATAL_H_
|
||||
#ifndef SUDO_FATAL_H
|
||||
#define SUDO_FATAL_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
@@ -156,4 +156,4 @@ __dso_public void sudo_warn_set_conversation_v1(int (*conv)(int num_msgs, const
|
||||
# define sudo_warn_gettext(_a) sudo_warn_gettext_v1(NULL, (_a))
|
||||
#endif
|
||||
|
||||
#endif /* _SUDO_FATAL_H_ */
|
||||
#endif /* SUDO_FATAL_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_GETTEXT_H
|
||||
#define _SUDO_GETTEXT_H
|
||||
#ifndef SUDO_GETTEXT_H
|
||||
#define SUDO_GETTEXT_H
|
||||
|
||||
/*
|
||||
* Solaris locale.h includes libintl.h which causes problems when we
|
||||
@@ -72,4 +72,4 @@
|
||||
|
||||
#endif /* HAVE_LIBINTL_H */
|
||||
|
||||
#endif /* _SUDO_GETTEXT_H */
|
||||
#endif /* SUDO_GETTEXT_H */
|
||||
|
@@ -17,8 +17,8 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_LBUF_H
|
||||
#define _SUDO_LBUF_H
|
||||
#ifndef SUDO_LBUF_H
|
||||
#define SUDO_LBUF_H
|
||||
|
||||
/*
|
||||
* Line buffer struct.
|
||||
@@ -47,4 +47,4 @@ __dso_public void sudo_lbuf_print_v1(struct sudo_lbuf *lbuf);
|
||||
#define sudo_lbuf_append_quoted sudo_lbuf_append_quoted_v1
|
||||
#define sudo_lbuf_print(_a) sudo_lbuf_print_v1((_a))
|
||||
|
||||
#endif /* _SUDO_LBUF_H */
|
||||
#endif /* SUDO_LBUF_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_PLUGIN_H
|
||||
#define _SUDO_PLUGIN_H
|
||||
#ifndef SUDO_PLUGIN_H
|
||||
#define SUDO_PLUGIN_H
|
||||
|
||||
/* API version major/minor */
|
||||
#define SUDO_API_VERSION_MAJOR 1
|
||||
@@ -192,4 +192,4 @@ struct sudoers_group_plugin {
|
||||
int (*query)(const char *user, const char *group, const struct passwd *pwd);
|
||||
};
|
||||
|
||||
#endif /* _SUDO_PLUGIN_H */
|
||||
#endif /* SUDO_PLUGIN_H */
|
||||
|
@@ -30,8 +30,8 @@
|
||||
* $FreeBSD: head/sys/sys/queue.h 251887 2013-06-18 02:57:56Z lstewart $
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_QUEUE_H_
|
||||
#define _SUDO_QUEUE_H_
|
||||
#ifndef SUDO_QUEUE_H
|
||||
#define SUDO_QUEUE_H
|
||||
|
||||
/*
|
||||
* This file defines four types of data structures: singly-linked lists,
|
||||
@@ -803,4 +803,4 @@ struct { \
|
||||
(head)->tqh_last = last; \
|
||||
} while (0)
|
||||
|
||||
#endif /* !_SUDO_QUEUE_H_ */
|
||||
#endif /* !SUDO_QUEUE_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_UTIL_H
|
||||
#define _SUDO_UTIL_H
|
||||
#ifndef SUDO_UTIL_H
|
||||
#define SUDO_UTIL_H
|
||||
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
@@ -232,4 +232,4 @@ __dso_public bool sudo_term_restore_v1(int fd, bool flush);
|
||||
__dso_public void sudo_get_ttysize_v1(int *rowp, int *colp);
|
||||
#define sudo_get_ttysize(_a, _b) sudo_get_ttysize_v1((_a), (_b))
|
||||
|
||||
#endif /* _SUDO_UTIL_H */
|
||||
#endif /* SUDO_UTIL_H */
|
||||
|
@@ -49,7 +49,7 @@ static sudo_conv_t sudo_warn_conversation;
|
||||
static bool (*sudo_warn_setlocale)(bool, int *);
|
||||
static bool (*sudo_warn_setlocale_prev)(bool, int *);
|
||||
|
||||
static void _warning(int errnum, const char *fmt, va_list ap);
|
||||
static void warning(int errnum, const char *fmt, va_list ap);
|
||||
|
||||
static void
|
||||
do_cleanup(void)
|
||||
@@ -70,7 +70,7 @@ sudo_fatal_nodebug_v1(const char *fmt, ...)
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
_warning(errno, fmt, ap);
|
||||
warning(errno, fmt, ap);
|
||||
va_end(ap);
|
||||
do_cleanup();
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -82,7 +82,7 @@ sudo_fatalx_nodebug_v1(const char *fmt, ...)
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
_warning(0, fmt, ap);
|
||||
warning(0, fmt, ap);
|
||||
va_end(ap);
|
||||
do_cleanup();
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -91,7 +91,7 @@ sudo_fatalx_nodebug_v1(const char *fmt, ...)
|
||||
void
|
||||
sudo_vfatal_nodebug_v1(const char *fmt, va_list ap)
|
||||
{
|
||||
_warning(errno, fmt, ap);
|
||||
warning(errno, fmt, ap);
|
||||
do_cleanup();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ sudo_vfatal_nodebug_v1(const char *fmt, va_list ap)
|
||||
void
|
||||
sudo_vfatalx_nodebug_v1(const char *fmt, va_list ap)
|
||||
{
|
||||
_warning(0, fmt, ap);
|
||||
warning(0, fmt, ap);
|
||||
do_cleanup();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ sudo_warn_nodebug_v1(const char *fmt, ...)
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
_warning(errno, fmt, ap);
|
||||
warning(errno, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
@@ -119,24 +119,24 @@ sudo_warnx_nodebug_v1(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
_warning(0, fmt, ap);
|
||||
warning(0, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
sudo_vwarn_nodebug_v1(const char *fmt, va_list ap)
|
||||
{
|
||||
_warning(errno, fmt, ap);
|
||||
warning(errno, fmt, ap);
|
||||
}
|
||||
|
||||
void
|
||||
sudo_vwarnx_nodebug_v1(const char *fmt, va_list ap)
|
||||
{
|
||||
_warning(0, fmt, ap);
|
||||
warning(0, fmt, ap);
|
||||
}
|
||||
|
||||
static void
|
||||
_warning(int errnum, const char *fmt, va_list ap)
|
||||
warning(int errnum, const char *fmt, va_list ap)
|
||||
{
|
||||
int cookie;
|
||||
|
||||
|
@@ -15,10 +15,10 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_BSM_AUDIT_H
|
||||
#define _SUDOERS_BSM_AUDIT_H
|
||||
#ifndef SUDOERS_BSM_AUDIT_H
|
||||
#define SUDOERS_BSM_AUDIT_H
|
||||
|
||||
int bsm_audit_success(char *argv[]);
|
||||
int bsm_audit_failure(char *argv[], char const * const, va_list);
|
||||
|
||||
#endif /* _SUDOERS_BSM_AUDIT_H */
|
||||
#endif /* SUDOERS_BSM_AUDIT_H */
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_CHECK_H
|
||||
#define _SUDOERS_CHECK_H
|
||||
#ifndef SUDOERS_CHECK_H
|
||||
#define SUDOERS_CHECK_H
|
||||
|
||||
/* Status codes for timestamp_status() */
|
||||
#define TS_CURRENT 0
|
||||
@@ -65,4 +65,4 @@ bool update_timestamp(struct passwd *pw);
|
||||
int build_timestamp(struct passwd *pw);
|
||||
int timestamp_status(struct passwd *pw);
|
||||
|
||||
#endif /* _SUDOERS_CHECK_H */
|
||||
#endif /* SUDOERS_CHECK_H */
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_DEFAULTS_H
|
||||
#define _SUDOERS_DEFAULTS_H
|
||||
#ifndef SUDOERS_DEFAULTS_H
|
||||
#define SUDOERS_DEFAULTS_H
|
||||
|
||||
#include <def_data.h>
|
||||
|
||||
@@ -117,4 +117,4 @@ bool check_defaults(int what, bool quiet);
|
||||
|
||||
extern struct sudo_defs_types sudo_defs_table[];
|
||||
|
||||
#endif /* _SUDOERS_DEFAULTS_H */
|
||||
#endif /* SUDOERS_DEFAULTS_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_INS_2001_H
|
||||
#define _SUDOERS_INS_2001_H
|
||||
#ifndef SUDOERS_INS_2001_H
|
||||
#define SUDOERS_INS_2001_H
|
||||
|
||||
/*
|
||||
* HAL insults (paraphrased) from 2001.
|
||||
@@ -30,4 +30,4 @@
|
||||
"This mission is too important for me to allow you to jeopardize it.",
|
||||
"I feel much better now.",
|
||||
|
||||
#endif /* _SUDOERS_INS_2001_H */
|
||||
#endif /* SUDOERS_INS_2001_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_INS_CLASSIC_H
|
||||
#define _SUDOERS_INS_CLASSIC_H
|
||||
#ifndef SUDOERS_INS_CLASSIC_H
|
||||
#define SUDOERS_INS_CLASSIC_H
|
||||
|
||||
/*
|
||||
* Insults from the original sudo(8).
|
||||
@@ -34,4 +34,4 @@
|
||||
"Do you think like you type?",
|
||||
"Your mind just hasn't been the same since the electro-shock, has it?",
|
||||
|
||||
#endif /* _SUDOERS_INS_CLASSIC_H */
|
||||
#endif /* SUDOERS_INS_CLASSIC_H */
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_INS_CSOPS_H
|
||||
#define _SUDOERS_INS_CSOPS_H
|
||||
#ifndef SUDOERS_INS_CSOPS_H
|
||||
#define SUDOERS_INS_CSOPS_H
|
||||
|
||||
/*
|
||||
* CSOps insults (may be site dependent).
|
||||
@@ -36,4 +36,4 @@
|
||||
"Have you considered trying to match wits with a rutabaga?",
|
||||
"You speak an infinite deal of nothing",
|
||||
|
||||
#endif /* _SUDOERS_INS_CSOPS_H */
|
||||
#endif /* SUDOERS_INS_CSOPS_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_INS_GOONS_H
|
||||
#define _SUDOERS_INS_GOONS_H
|
||||
#ifndef SUDOERS_INS_GOONS_H
|
||||
#define SUDOERS_INS_GOONS_H
|
||||
|
||||
/*
|
||||
* Insults from the "Goon Show."
|
||||
@@ -45,4 +45,4 @@
|
||||
"It's only your word against mine.",
|
||||
"I think ... err ... I think ... I think I'll go home",
|
||||
|
||||
#endif /* _SUDOERS_INS_GOONS_H */
|
||||
#endif /* SUDOERS_INS_GOONS_H */
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_INSULTS_H
|
||||
#define _SUDOERS_INSULTS_H
|
||||
#ifndef SUDOERS_INSULTS_H
|
||||
#define SUDOERS_INSULTS_H
|
||||
|
||||
#if defined(HAL_INSULTS) || defined(GOONS_INSULTS) || defined(CLASSIC_INSULTS) || defined(CSOPS_INSULTS)
|
||||
|
||||
@@ -58,4 +58,4 @@ char *insults[] = {
|
||||
|
||||
#endif /* HAL_INSULTS || GOONS_INSULTS || CLASSIC_INSULTS || CSOPS_INSULTS */
|
||||
|
||||
#endif /* _SUDOERS_INSULTS_H */
|
||||
#endif /* SUDOERS_INSULTS_H */
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_INTERFACES_H
|
||||
#define _SUDOERS_INTERFACES_H
|
||||
#ifndef SUDOERS_INTERFACES_H
|
||||
#define SUDOERS_INTERFACES_H
|
||||
|
||||
/*
|
||||
* Union to hold either strucr in_addr or in6_add
|
||||
@@ -52,4 +52,4 @@ void dump_interfaces(const char *);
|
||||
void set_interfaces(const char *);
|
||||
struct interface_list *get_interfaces(void);
|
||||
|
||||
#endif /* _SUDOERS_INTERFACES_H */
|
||||
#endif /* SUDOERS_INTERFACES_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_IOLOG_H
|
||||
#define _SUDOERS_IOLOG_H
|
||||
#ifndef SUDOERS_IOLOG_H
|
||||
#define SUDOERS_IOLOG_H
|
||||
|
||||
/*
|
||||
* I/O log fd numbers as stored in the timing file.
|
||||
@@ -56,4 +56,4 @@ static struct io_log_file io_log_files[] = {
|
||||
{ false, NULL } /* IOFD_MAX */
|
||||
};
|
||||
|
||||
#endif /* _SUDOERS_IOLOG_H */
|
||||
#endif /* SUDOERS_IOLOG_H */
|
||||
|
@@ -14,9 +14,9 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_LINUX_AUDIT_H
|
||||
#define _SUDOERS_LINUX_AUDIT_H
|
||||
#ifndef SUDOERS_LINUX_AUDIT_H
|
||||
#define SUDOERS_LINUX_AUDIT_H
|
||||
|
||||
int linux_audit_command(char *argv[], int result);
|
||||
|
||||
#endif /* _SUDOERS_LINUX_AUDIT_H */
|
||||
#endif /* SUDOERS_LINUX_AUDIT_H */
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_LOGGING_H
|
||||
#define _SUDOERS_LOGGING_H
|
||||
#ifndef SUDOERS_LOGGING_H
|
||||
#define SUDOERS_LOGGING_H
|
||||
|
||||
#include <syslog.h>
|
||||
#ifdef __STDC__
|
||||
@@ -58,7 +58,7 @@
|
||||
*/
|
||||
#define LOG_INDENT " "
|
||||
|
||||
#ifndef _SUDO_MAIN
|
||||
#ifndef SUDO_MAIN
|
||||
/* XXX - needed for auditing */
|
||||
extern int NewArgc;
|
||||
extern char **NewArgv;
|
||||
@@ -78,4 +78,4 @@ void log_warningx(int flags, const char *fmt, ...) __printflike(2, 3);
|
||||
void sudoers_initlocale(const char *ulocale, const char *slocale);
|
||||
void writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen);
|
||||
|
||||
#endif /* _SUDOERS_LOGGING_H */
|
||||
#endif /* SUDOERS_LOGGING_H */
|
||||
|
@@ -63,7 +63,7 @@ static int sudo_file_open(struct sudo_nss *);
|
||||
static int sudo_file_parse(struct sudo_nss *);
|
||||
static int sudo_file_setdefs(struct sudo_nss *);
|
||||
static void print_member(struct sudo_lbuf *lbuf, struct member *m, int alias_type);
|
||||
static void print_member2(struct sudo_lbuf *lbuf, struct member *m, const char *separator, int alias_type);
|
||||
static void print_member_sep(struct sudo_lbuf *lbuf, struct member *m, const char *separator, int alias_type);
|
||||
|
||||
/* sudo_nss implementation */
|
||||
struct sudo_nss sudo_nss_file = {
|
||||
@@ -537,7 +537,7 @@ sudo_file_display_priv_long(struct passwd *pw, struct userspec *us,
|
||||
sudo_lbuf_append(lbuf, _(" Commands:\n"));
|
||||
}
|
||||
sudo_lbuf_append(lbuf, "\t");
|
||||
print_member2(lbuf, cs->cmnd, "\n\t", CMNDALIAS);
|
||||
print_member_sep(lbuf, cs->cmnd, "\n\t", CMNDALIAS);
|
||||
sudo_lbuf_append(lbuf, "\n");
|
||||
prev_cs = cs;
|
||||
nfound++;
|
||||
@@ -752,13 +752,13 @@ done:
|
||||
* Print the contents of a struct member to stdout
|
||||
*/
|
||||
static void
|
||||
_print_member(struct sudo_lbuf *lbuf, char *name, int type, int negated,
|
||||
print_member_int(struct sudo_lbuf *lbuf, char *name, int type, int negated,
|
||||
const char *separator, int alias_type)
|
||||
{
|
||||
struct alias *a;
|
||||
struct member *m;
|
||||
struct sudo_command *c;
|
||||
debug_decl(_print_member, SUDOERS_DEBUG_NSS)
|
||||
debug_decl(print_member_int, SUDOERS_DEBUG_NSS)
|
||||
|
||||
switch (type) {
|
||||
case ALL:
|
||||
@@ -782,7 +782,7 @@ _print_member(struct sudo_lbuf *lbuf, char *name, int type, int negated,
|
||||
TAILQ_FOREACH(m, &a->members, entries) {
|
||||
if (m != TAILQ_FIRST(&a->members))
|
||||
sudo_lbuf_append(lbuf, "%s", separator);
|
||||
_print_member(lbuf, m->name, m->type,
|
||||
print_member_int(lbuf, m->name, m->type,
|
||||
negated ? !m->negated : m->negated, separator,
|
||||
alias_type);
|
||||
}
|
||||
@@ -800,12 +800,12 @@ _print_member(struct sudo_lbuf *lbuf, char *name, int type, int negated,
|
||||
static void
|
||||
print_member(struct sudo_lbuf *lbuf, struct member *m, int alias_type)
|
||||
{
|
||||
_print_member(lbuf, m->name, m->type, m->negated, ", ", alias_type);
|
||||
print_member_int(lbuf, m->name, m->type, m->negated, ", ", alias_type);
|
||||
}
|
||||
|
||||
static void
|
||||
print_member2(struct sudo_lbuf *lbuf, struct member *m, const char *separator,
|
||||
int alias_type)
|
||||
print_member_sep(struct sudo_lbuf *lbuf, struct member *m,
|
||||
const char *separator, int alias_type)
|
||||
{
|
||||
_print_member(lbuf, m->name, m->type, m->negated, separator, alias_type);
|
||||
print_member_int(lbuf, m->name, m->type, m->negated, separator, alias_type);
|
||||
}
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_PARSE_H
|
||||
#define _SUDOERS_PARSE_H
|
||||
#ifndef SUDOERS_PARSE_H
|
||||
#define SUDOERS_PARSE_H
|
||||
|
||||
#undef UNSPEC
|
||||
#define UNSPEC -1
|
||||
@@ -223,4 +223,4 @@ int hexchar(const char *s);
|
||||
/* base64.c */
|
||||
size_t base64_decode(const char *str, unsigned char *dst, size_t dsize);
|
||||
|
||||
#endif /* _SUDOERS_PARSE_H */
|
||||
#endif /* SUDOERS_PARSE_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_PWUTIL_H
|
||||
#define _SUDOERS_PWUTIL_H
|
||||
#ifndef SUDOERS_PWUTIL_H
|
||||
#define SUDOERS_PWUTIL_H
|
||||
|
||||
#define ptr_to_item(p) ((struct cache_item *)((char *)p - offsetof(struct cache_item_##p, p)))
|
||||
|
||||
@@ -62,4 +62,4 @@ struct cache_item *sudo_make_gritem(gid_t gid, const char *group);
|
||||
struct cache_item *sudo_make_grlist_item(const struct passwd *pw, char * const *groups, char * const *gids);
|
||||
struct cache_item *sudo_make_pwitem(uid_t uid, const char *user);
|
||||
|
||||
#endif /* _SUDOERS_PWUTIL_H */
|
||||
#endif /* SUDOERS_PWUTIL_H */
|
||||
|
@@ -60,7 +60,7 @@
|
||||
static void rbrepair(struct rbtree *, struct rbnode *);
|
||||
static void rotate_left(struct rbtree *, struct rbnode *);
|
||||
static void rotate_right(struct rbtree *, struct rbnode *);
|
||||
static void _rbdestroy(struct rbtree *, struct rbnode *, void (*)(void *));
|
||||
static void rbdestroy_int(struct rbtree *, struct rbnode *, void (*)(void *));
|
||||
|
||||
/*
|
||||
* Red-Black tree, see http://en.wikipedia.org/wiki/Red-black_tree
|
||||
@@ -333,12 +333,12 @@ rbsuccessor(struct rbtree *tree, struct rbnode *node)
|
||||
* Recursive portion of rbdestroy().
|
||||
*/
|
||||
static void
|
||||
_rbdestroy(struct rbtree *tree, struct rbnode *node, void (*destroy)(void *))
|
||||
rbdestroy_int(struct rbtree *tree, struct rbnode *node, void (*destroy)(void *))
|
||||
{
|
||||
debug_decl(_rbdestroy, SUDOERS_DEBUG_RBTREE)
|
||||
debug_decl(rbdestroy_int, SUDOERS_DEBUG_RBTREE)
|
||||
if (node != rbnil(tree)) {
|
||||
_rbdestroy(tree, node->left, destroy);
|
||||
_rbdestroy(tree, node->right, destroy);
|
||||
rbdestroy_int(tree, node->left, destroy);
|
||||
rbdestroy_int(tree, node->right, destroy);
|
||||
if (destroy != NULL)
|
||||
destroy(node->data);
|
||||
sudo_efree(node);
|
||||
@@ -354,7 +354,7 @@ void
|
||||
rbdestroy(struct rbtree *tree, void (*destroy)(void *))
|
||||
{
|
||||
debug_decl(rbdestroy, SUDOERS_DEBUG_RBTREE)
|
||||
_rbdestroy(tree, rbfirst(tree), destroy);
|
||||
rbdestroy_int(tree, rbfirst(tree), destroy);
|
||||
sudo_efree(tree);
|
||||
debug_return;
|
||||
}
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_REDBLACK_H
|
||||
#define _SUDOERS_REDBLACK_H
|
||||
#ifndef SUDOERS_REDBLACK_H
|
||||
#define SUDOERS_REDBLACK_H
|
||||
|
||||
enum rbcolor {
|
||||
red,
|
||||
@@ -55,4 +55,4 @@ struct rbnode *rbinsert(struct rbtree *, void *);
|
||||
struct rbtree *rbcreate(int (*)(const void *, const void *));
|
||||
void rbdestroy(struct rbtree *, void (*)(void *));
|
||||
|
||||
#endif /* _SUDOERS_REDBLACK_H */
|
||||
#endif /* SUDOERS_REDBLACK_H */
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
#define SUDO_ERROR_WRAP 0
|
||||
|
||||
#define _SUDO_MAIN
|
||||
#define SUDO_MAIN
|
||||
#include "sudoers.h"
|
||||
#include "def_data.c"
|
||||
|
||||
|
@@ -14,10 +14,10 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_SOLARIS_AUDIT_H
|
||||
#define _SUDOERS_SOLARIS_AUDIT_H
|
||||
#ifndef SUDOERS_SOLARIS_AUDIT_H
|
||||
#define SUDOERS_SOLARIS_AUDIT_H
|
||||
|
||||
int solaris_audit_success(int argc, char *argv[]);
|
||||
int solaris_audit_failure(int argc, char *argv[], char const *const fmt, va_list);
|
||||
|
||||
#endif /* _SUDOERS_SOLARIS_AUDIT_H */
|
||||
#endif /* SUDOERS_SOLARIS_AUDIT_H */
|
||||
|
@@ -159,11 +159,11 @@ sudo_sss_rulecpy(struct sss_sudo_rule *dst, const struct sss_sudo_rule *src)
|
||||
debug_return;
|
||||
}
|
||||
|
||||
#define _SUDO_SSS_FILTER_INCLUDE 0
|
||||
#define _SUDO_SSS_FILTER_EXCLUDE 1
|
||||
#define SUDO_SSS_FILTER_INCLUDE 0
|
||||
#define SUDO_SSS_FILTER_EXCLUDE 1
|
||||
|
||||
#define _SUDO_SSS_STATE_HOSTMATCH 0x01
|
||||
#define _SUDO_SSS_STATE_USERMATCH 0x02
|
||||
#define SUDO_SSS_STATE_HOSTMATCH 0x01
|
||||
#define SUDO_SSS_STATE_USERMATCH 0x02
|
||||
|
||||
static struct sss_sudo_result *
|
||||
sudo_sss_filter_result(struct sudo_sss_handle *handle,
|
||||
@@ -178,7 +178,7 @@ sudo_sss_filter_result(struct sudo_sss_handle *handle,
|
||||
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG, "in_res=%p, count=%u, act=%s",
|
||||
in_res, in_res ? in_res->num_rules : 0,
|
||||
act == _SUDO_SSS_FILTER_EXCLUDE ? "EXCLUDE" : "INCLUDE");
|
||||
act == SUDO_SSS_FILTER_EXCLUDE ? "EXCLUDE" : "INCLUDE");
|
||||
|
||||
if (in_res == NULL)
|
||||
debug_return_ptr(NULL);
|
||||
@@ -193,11 +193,11 @@ sudo_sss_filter_result(struct sudo_sss_handle *handle,
|
||||
for (i = l = 0; i < in_res->num_rules; ++i) {
|
||||
r = filterp(handle, in_res->rules + i, filterp_arg);
|
||||
|
||||
if (( r && act == _SUDO_SSS_FILTER_INCLUDE) ||
|
||||
(!r && act == _SUDO_SSS_FILTER_EXCLUDE)) {
|
||||
if (( r && act == SUDO_SSS_FILTER_INCLUDE) ||
|
||||
(!r && act == SUDO_SSS_FILTER_EXCLUDE)) {
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG,
|
||||
"COPY (%s): %p[%u] => %p[%u] (= %p)",
|
||||
act == _SUDO_SSS_FILTER_EXCLUDE ? "not excluded" : "included",
|
||||
act == SUDO_SSS_FILTER_EXCLUDE ? "not excluded" : "included",
|
||||
in_res->rules, i, out_res->rules, l, in_res->rules + i);
|
||||
|
||||
sudo_sss_rulecpy(out_res->rules + l, in_res->rules + i);
|
||||
@@ -683,7 +683,7 @@ sudo_sss_result_get(struct sudo_nss *nss, struct passwd *pw, uint32_t *state)
|
||||
if (u_sss_result != NULL) {
|
||||
if (state != NULL) {
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG, "state |= USERMATCH");
|
||||
*state |= _SUDO_SSS_STATE_USERMATCH;
|
||||
*state |= SUDO_SSS_STATE_USERMATCH;
|
||||
}
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO, "Received %u rule(s)",
|
||||
u_sss_result->num_rules);
|
||||
@@ -707,13 +707,13 @@ sudo_sss_result_get(struct sudo_nss *nss, struct passwd *pw, uint32_t *state)
|
||||
}
|
||||
|
||||
f_sss_result = sudo_sss_filter_result(handle, u_sss_result,
|
||||
sudo_sss_result_filterp, _SUDO_SSS_FILTER_INCLUDE, NULL);
|
||||
sudo_sss_result_filterp, SUDO_SSS_FILTER_INCLUDE, NULL);
|
||||
|
||||
if (f_sss_result != NULL) {
|
||||
if (f_sss_result->num_rules > 0) {
|
||||
if (state != NULL) {
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG, "state |= HOSTMATCH");
|
||||
*state |= _SUDO_SSS_STATE_HOSTMATCH;
|
||||
*state |= SUDO_SSS_STATE_HOSTMATCH;
|
||||
}
|
||||
}
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG,
|
||||
@@ -1086,9 +1086,9 @@ done:
|
||||
SET(ret, FLAG_NO_CHECK);
|
||||
}
|
||||
|
||||
if (state & _SUDO_SSS_STATE_USERMATCH)
|
||||
if (state & SUDO_SSS_STATE_USERMATCH)
|
||||
CLR(ret, FLAG_NO_USER);
|
||||
if (state & _SUDO_SSS_STATE_HOSTMATCH)
|
||||
if (state & SUDO_SSS_STATE_HOSTMATCH)
|
||||
CLR(ret, FLAG_NO_HOST);
|
||||
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG, "sudo_sss_lookup(%d)=0x%02x",
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_NSS_H
|
||||
#define _SUDOERS_NSS_H
|
||||
#ifndef SUDOERS_NSS_H
|
||||
#define SUDOERS_NSS_H
|
||||
|
||||
struct sudo_lbuf;
|
||||
struct passwd;
|
||||
@@ -40,4 +40,4 @@ TAILQ_HEAD(sudo_nss_list, sudo_nss);
|
||||
|
||||
struct sudo_nss_list *sudo_read_nss(void);
|
||||
|
||||
#endif /* _SUDOERS_NSS_H */
|
||||
#endif /* SUDOERS_NSS_H */
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include "sudo_debug.h"
|
||||
|
||||
static int
|
||||
_sudo_printf(int msg_type, const char *fmt, ...)
|
||||
sudo_printf_int(int msg_type, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int len;
|
||||
@@ -59,4 +59,4 @@ _sudo_printf(int msg_type, const char *fmt, ...)
|
||||
return len;
|
||||
}
|
||||
|
||||
sudo_printf_t sudo_printf = _sudo_printf;
|
||||
sudo_printf_t sudo_printf = sudo_printf_int;
|
||||
|
@@ -18,7 +18,7 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#define _SUDO_MAIN
|
||||
#define SUDO_MAIN
|
||||
|
||||
#ifdef __TANDEM
|
||||
# include <floss.h>
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_SUDOERS_H
|
||||
#define _SUDOERS_SUDOERS_H
|
||||
#ifndef SUDOERS_SUDOERS_H
|
||||
#define SUDOERS_SUDOERS_H
|
||||
|
||||
#include <limits.h>
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
@@ -362,7 +362,7 @@ void group_plugin_unload(void);
|
||||
int group_plugin_query(const char *user, const char *group,
|
||||
const struct passwd *pwd);
|
||||
|
||||
#ifndef _SUDO_MAIN
|
||||
#ifndef SUDO_MAIN
|
||||
extern struct sudo_user sudo_user;
|
||||
extern struct passwd *list_pw;
|
||||
extern int long_list;
|
||||
@@ -372,4 +372,4 @@ extern sudo_conv_t sudo_conv;
|
||||
extern sudo_printf_t sudo_printf;
|
||||
#endif
|
||||
|
||||
#endif /* _SUDOERS_SUDOERS_H */
|
||||
#endif /* SUDOERS_SUDOERS_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_DEBUG_H
|
||||
#define _SUDOERS_DEBUG_H
|
||||
#ifndef SUDOERS_DEBUG_H
|
||||
#define SUDOERS_DEBUG_H
|
||||
|
||||
#include "sudo_debug.h"
|
||||
|
||||
@@ -43,4 +43,4 @@ extern unsigned int sudoers_subsystem_ids[];
|
||||
#define SUDOERS_DEBUG_SSSD (sudoers_subsystem_ids[16]) /* sudoers SSSD */
|
||||
#define SUDOERS_DEBUG_UTIL (sudoers_subsystem_ids[17]) /* utility functions */
|
||||
|
||||
#endif /* _SUDOERS_DEBUG_H */
|
||||
#endif /* SUDOERS_DEBUG_H */
|
||||
|
@@ -65,9 +65,9 @@
|
||||
* 44 sudo 1.8.13, added MAIL/NOMAIL tags.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_VERSION_H
|
||||
#define _SUDOERS_VERSION_H
|
||||
#ifndef SUDOERS_VERSION_H
|
||||
#define SUDOERS_VERSION_H
|
||||
|
||||
#define SUDOERS_GRAMMAR_VERSION 44
|
||||
|
||||
#endif /* _SUDOERS_VERSION_H */
|
||||
#endif /* SUDOERS_VERSION_H */
|
||||
|
@@ -21,7 +21,7 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#define _SUDO_MAIN
|
||||
#define SUDO_MAIN
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@@ -2031,7 +2031,7 @@ static bool continued, sawspace;
|
||||
static int prev_state;
|
||||
static int digest_len;
|
||||
|
||||
static bool _push_include(char *, bool);
|
||||
static bool push_include_int(char *, bool);
|
||||
static bool pop_include(void);
|
||||
static char *parse_include(char *);
|
||||
|
||||
@@ -2044,8 +2044,8 @@ int (*trace_print)(const char *msg) = sudoers_trace_print;
|
||||
|
||||
#define ECHO ignore_result(fwrite(sudoerstext, sudoersleng, 1, sudoersout))
|
||||
|
||||
#define push_include(_p) (_push_include((_p), false))
|
||||
#define push_includedir(_p) (_push_include((_p), true))
|
||||
#define push_include(_p) (push_include_int((_p), false))
|
||||
#define push_includedir(_p) (push_include_int((_p), true))
|
||||
#define YY_NO_INPUT 1
|
||||
#define YY_NO_UNPUT 1
|
||||
#define GOTDEFS 1
|
||||
@@ -4182,11 +4182,11 @@ init_lexer(void)
|
||||
}
|
||||
|
||||
static bool
|
||||
_push_include(char *path, bool isdir)
|
||||
push_include_int(char *path, bool isdir)
|
||||
{
|
||||
struct path_list *pl;
|
||||
FILE *fp;
|
||||
debug_decl(_push_include, SUDOERS_DEBUG_PARSER)
|
||||
debug_decl(push_include_int, SUDOERS_DEBUG_PARSER)
|
||||
|
||||
/* push current state onto stack */
|
||||
if (idepth >= istacksize) {
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDOERS_TOKE_H
|
||||
#define _SUDOERS_TOKE_H
|
||||
#ifndef SUDOERS_TOKE_H
|
||||
#define SUDOERS_TOKE_H
|
||||
|
||||
bool append(const char *, int);
|
||||
bool fill_args(const char *, int, int);
|
||||
@@ -39,4 +39,4 @@ extern int (*trace_print)(const char *msg);
|
||||
(*trace_print)(msg); \
|
||||
} while (0);
|
||||
|
||||
#endif /* _SUDOERS_TOKE_H */
|
||||
#endif /* SUDOERS_TOKE_H */
|
||||
|
@@ -97,7 +97,7 @@ static bool continued, sawspace;
|
||||
static int prev_state;
|
||||
static int digest_len;
|
||||
|
||||
static bool _push_include(char *, bool);
|
||||
static bool push_include_int(char *, bool);
|
||||
static bool pop_include(void);
|
||||
static char *parse_include(char *);
|
||||
|
||||
@@ -110,8 +110,8 @@ int (*trace_print)(const char *msg) = sudoers_trace_print;
|
||||
|
||||
#define ECHO ignore_result(fwrite(sudoerstext, sudoersleng, 1, sudoersout))
|
||||
|
||||
#define push_include(_p) (_push_include((_p), false))
|
||||
#define push_includedir(_p) (_push_include((_p), true))
|
||||
#define push_include(_p) (push_include_int((_p), false))
|
||||
#define push_includedir(_p) (push_include_int((_p), true))
|
||||
%}
|
||||
|
||||
HEX16 [0-9A-Fa-f]{1,4}
|
||||
@@ -911,11 +911,11 @@ init_lexer(void)
|
||||
}
|
||||
|
||||
static bool
|
||||
_push_include(char *path, bool isdir)
|
||||
push_include_int(char *path, bool isdir)
|
||||
{
|
||||
struct path_list *pl;
|
||||
FILE *fp;
|
||||
debug_decl(_push_include, SUDOERS_DEBUG_PARSER)
|
||||
debug_decl(push_include_int, SUDOERS_DEBUG_PARSER)
|
||||
|
||||
/* push current state onto stack */
|
||||
if (idepth >= istacksize) {
|
||||
|
@@ -23,7 +23,7 @@
|
||||
* Lock the sudoers file for safe editing (ala vipw) and check for parse errors.
|
||||
*/
|
||||
|
||||
#define _SUDO_MAIN
|
||||
#define SUDO_MAIN
|
||||
|
||||
#ifdef __TANDEM
|
||||
# include <floss.h>
|
||||
|
@@ -84,7 +84,7 @@ struct rtentry;
|
||||
# include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
#define _SUDO_NET_IFS_C /* to expose sudo_inet_ntop in sudo_compat.h */
|
||||
#define SUDO_NET_IFS_C /* to expose sudo_inet_ntop in sudo_compat.h */
|
||||
|
||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||
#include "sudo_gettext.h" /* must be included before sudo_compat.h */
|
||||
|
@@ -19,8 +19,8 @@
|
||||
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_SUDO_H
|
||||
#define _SUDO_SUDO_H
|
||||
#ifndef SUDO_SUDO_H
|
||||
#define SUDO_SUDO_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <pathnames.h>
|
||||
@@ -261,4 +261,4 @@ int add_preserved_fd(struct preserved_fd_list *pfds, int fd);
|
||||
void closefrom_except(int startfd, struct preserved_fd_list *pfds);
|
||||
void parse_preserved_fds(struct preserved_fd_list *pfds, const char *fdstr);
|
||||
|
||||
#endif /* _SUDO_SUDO_H */
|
||||
#endif /* SUDO_SUDO_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_EXEC_H
|
||||
#define _SUDO_EXEC_H
|
||||
#ifndef SUDO_EXEC_H
|
||||
#define SUDO_EXEC_H
|
||||
|
||||
/*
|
||||
* Older systems may not support MSG_WAITALL but it shouldn't really be needed.
|
||||
@@ -99,4 +99,4 @@ bool utmp_login(const char *from_line, const char *to_line, int ttyfd,
|
||||
const char *user);
|
||||
bool utmp_logout(const char *line, int status);
|
||||
|
||||
#endif /* _SUDO_EXEC_H */
|
||||
#endif /* SUDO_EXEC_H */
|
||||
|
@@ -14,8 +14,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_PLUGIN_INT_H
|
||||
#define _SUDO_PLUGIN_INT_H
|
||||
#ifndef SUDO_PLUGIN_INT_H
|
||||
#define SUDO_PLUGIN_INT_H
|
||||
|
||||
/*
|
||||
* All plugin structures start with a type and a version.
|
||||
@@ -109,4 +109,4 @@ int sudo_conversation_printf(int msg_type, const char *fmt, ...);
|
||||
bool sudo_load_plugins(struct plugin_container *policy_plugin,
|
||||
struct plugin_container_list *io_plugins);
|
||||
|
||||
#endif /* _SUDO_PLUGIN_INT_H */
|
||||
#endif /* SUDO_PLUGIN_INT_H */
|
||||
|
@@ -16,8 +16,8 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _SUDO_USAGE_H
|
||||
#define _SUDO_USAGE_H
|
||||
#ifndef SUDO_USAGE_H
|
||||
#define SUDO_USAGE_H
|
||||
|
||||
/*
|
||||
* Usage strings for sudo. These are here because we
|
||||
@@ -34,4 +34,4 @@
|
||||
*/
|
||||
#define CONFIGURE_ARGS "@CONFIGURE_ARGS@"
|
||||
|
||||
#endif /* _SUDO_USAGE_H */
|
||||
#endif /* SUDO_USAGE_H */
|
||||
|
Reference in New Issue
Block a user