We must include gettext.h before missing.h as it includes system
headers. Also add missing DEFAULT_TEXT_DOMAIN defines in sudoers audit code that does not include sudoers.h.
This commit is contained in:
@@ -31,15 +31,15 @@
|
|||||||
#include <usersec.h>
|
#include <usersec.h>
|
||||||
#include <uinfo.h>
|
#include <uinfo.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "sudo_util.h"
|
#include "sudo_util.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_GETUSERATTR
|
#ifdef HAVE_GETUSERATTR
|
||||||
|
|
||||||
#ifndef HAVE_SETRLIMIT64
|
#ifndef HAVE_SETRLIMIT64
|
||||||
|
@@ -48,13 +48,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there is no SIZE_MAX or SIZE_T_MAX we have to assume that size_t
|
* If there is no SIZE_MAX or SIZE_T_MAX we have to assume that size_t
|
||||||
* could be signed (as it is on SunOS 4.x). This just means that
|
* could be signed (as it is on SunOS 4.x). This just means that
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
#include "gettext.h"
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
#include "gettext.h"
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
|
@@ -28,15 +28,15 @@
|
|||||||
# include "compat/stdbool.h"
|
# include "compat/stdbool.h"
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "sudo_plugin.h"
|
#include "sudo_plugin.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
struct sudo_fatal_callback {
|
struct sudo_fatal_callback {
|
||||||
SLIST_ENTRY(sudo_fatal_callback) entries;
|
SLIST_ENTRY(sudo_fatal_callback) entries;
|
||||||
void (*func)(void);
|
void (*func)(void);
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
#include "gettext.h"
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
|
@@ -45,6 +45,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
@@ -58,9 +61,6 @@
|
|||||||
#include "sudo_util.h"
|
#include "sudo_util.h"
|
||||||
#include "secure_path.h"
|
#include "secure_path.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
#ifdef __TANDEM
|
#ifdef __TANDEM
|
||||||
# define ROOT_UID 65535
|
# define ROOT_UID 65535
|
||||||
#else
|
#else
|
||||||
|
@@ -47,6 +47,9 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
@@ -54,9 +57,6 @@
|
|||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "sudo_util.h"
|
#include "sudo_util.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The debug priorities and subsystems are currently hard-coded.
|
* The debug priorities and subsystems are currently hard-coded.
|
||||||
* In the future we might consider allowing plugins to register their
|
* In the future we might consider allowing plugins to register their
|
||||||
|
@@ -23,10 +23,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include "missing.h"
|
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
#include "gettext.h"
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
|
#include "missing.h"
|
||||||
|
|
||||||
#if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1
|
#if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1
|
||||||
# define sudo_sys_siglist sys_siglist
|
# define sudo_sys_siglist sys_siglist
|
||||||
|
@@ -37,10 +37,10 @@
|
|||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif /* HAVE_STRINGS_H */
|
#endif /* HAVE_STRINGS_H */
|
||||||
|
|
||||||
#include "missing.h"
|
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
#include "gettext.h"
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
|
#include "missing.h"
|
||||||
|
|
||||||
#ifdef HAVE_STRTONUM
|
#ifdef HAVE_STRTONUM
|
||||||
|
|
||||||
|
@@ -33,6 +33,9 @@
|
|||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
@@ -44,9 +47,6 @@
|
|||||||
# include "linux_audit.h"
|
# include "linux_audit.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
audit_success(char *exec_args[])
|
audit_success(char *exec_args[])
|
||||||
{
|
{
|
||||||
|
@@ -30,9 +30,11 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "gettext.h"
|
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "bsm_audit.h"
|
#include "bsm_audit.h"
|
||||||
|
|
||||||
|
@@ -31,10 +31,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libaudit.h>
|
#include <libaudit.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "gettext.h"
|
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "linux_audit.h"
|
#include "linux_audit.h"
|
||||||
|
|
||||||
|
@@ -38,11 +38,13 @@
|
|||||||
# include "compat/stdbool.h"
|
# include "compat/stdbool.h"
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
static int current_locale = SUDOERS_LOCALE_USER;
|
static int current_locale = SUDOERS_LOCALE_USER;
|
||||||
static char *user_locale;
|
static char *user_locale;
|
||||||
|
@@ -29,6 +29,9 @@
|
|||||||
# include "compat/stdbool.h"
|
# include "compat/stdbool.h"
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include <pathnames.h>
|
#include <pathnames.h>
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
@@ -42,9 +45,6 @@
|
|||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "sudo_util.h"
|
#include "sudo_util.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudoers"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Password db and supplementary group IDs with associated group names.
|
* Password db and supplementary group IDs with associated group names.
|
||||||
*/
|
*/
|
||||||
|
@@ -89,10 +89,11 @@
|
|||||||
|
|
||||||
#include <pathnames.h>
|
#include <pathnames.h>
|
||||||
|
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "gettext.h"
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "iolog.h"
|
#include "iolog.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
@@ -79,7 +79,6 @@
|
|||||||
#include "sudoers.h"
|
#include "sudoers.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "redblack.h"
|
#include "redblack.h"
|
||||||
#include "gettext.h"
|
|
||||||
#include "sudoers_version.h"
|
#include "sudoers_version.h"
|
||||||
#include "sudo_conf.h"
|
#include "sudo_conf.h"
|
||||||
#include <gram.h>
|
#include <gram.h>
|
||||||
|
@@ -40,7 +40,6 @@
|
|||||||
|
|
||||||
#include "sudoers.h"
|
#include "sudoers.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "gettext.h"
|
|
||||||
#include <gram.h>
|
#include <gram.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -21,9 +21,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBINTL_H
|
#ifdef HAVE_LIBINTL_H
|
||||||
/* No need to swap locales in the front end. */
|
/* No need to swap locales in the front end. */
|
||||||
|
@@ -84,15 +84,15 @@ struct rtentry;
|
|||||||
# include <ifaddrs.h>
|
# include <ifaddrs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DEFAULT_TEXT_DOMAIN "sudo"
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "sudo_conf.h"
|
#include "sudo_conf.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
|
|
||||||
#define DEFAULT_TEXT_DOMAIN "sudo"
|
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
/* Minix apparently lacks IFF_LOOPBACK */
|
/* Minix apparently lacks IFF_LOOPBACK */
|
||||||
#ifndef IFF_LOOPBACK
|
#ifndef IFF_LOOPBACK
|
||||||
# define IFF_LOOPBACK 0
|
# define IFF_LOOPBACK 0
|
||||||
|
@@ -31,10 +31,11 @@
|
|||||||
# include "compat/stdbool.h"
|
# include "compat/stdbool.h"
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
#include "gettext.h"
|
|
||||||
#include "sudo_conf.h"
|
#include "sudo_conf.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "sudo_exec.h"
|
#include "sudo_exec.h"
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
# include "compat/stdbool.h"
|
# include "compat/stdbool.h"
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
|
#include "gettext.h" /* must be included before missing.h */
|
||||||
|
|
||||||
#include "missing.h"
|
#include "missing.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "fatal.h"
|
#include "fatal.h"
|
||||||
@@ -37,7 +39,6 @@
|
|||||||
#include "sudo_conf.h"
|
#include "sudo_conf.h"
|
||||||
#include "sudo_debug.h"
|
#include "sudo_debug.h"
|
||||||
#include "sudo_util.h"
|
#include "sudo_util.h"
|
||||||
#include "gettext.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_PRIV_SET
|
#ifdef HAVE_PRIV_SET
|
||||||
# include <priv.h>
|
# include <priv.h>
|
||||||
|
Reference in New Issue
Block a user