Rename __dso_public -> sudo_dso_public and move to config.h.
This commit is contained in:
13
config.h.in
13
config.h.in
@@ -1324,6 +1324,19 @@
|
||||
code using `volatile' can become incorrect without. Disable with care. */
|
||||
#undef volatile
|
||||
|
||||
/* Symbol visibility controls */
|
||||
#ifdef HAVE_DSO_VISIBILITY
|
||||
# if defined(__GNUC__)
|
||||
# define sudo_dso_public __attribute__((__visibility__("default")))
|
||||
# elif defined(__SUNPRO_C)
|
||||
# define sudo_dso_public __global
|
||||
# else
|
||||
# define sudo_dso_public __declspec(dllexport)
|
||||
# endif
|
||||
#else
|
||||
# define sudo_dso_public
|
||||
#endif
|
||||
|
||||
/* BSD compatibility on some SVR4 systems. */
|
||||
#ifdef __svr4__
|
||||
# define BSD_COMP
|
||||
|
17
configure.ac
17
configure.ac
@@ -4343,7 +4343,7 @@ dnl
|
||||
dnl Check whether ld supports version scripts (only GNU and Solaris ld).
|
||||
dnl If possible, we use this even if the compiler has symbol visibility
|
||||
dnl support so we will notice mismatches between the exports file and
|
||||
dnl __dso_public annotations in the source code.
|
||||
dnl sudo_dso_public annotations in the source code.
|
||||
dnl This test relies on AC_LANG_WERROR
|
||||
dnl
|
||||
if test "$lt_cv_prog_gnu_ld" = "yes"; then
|
||||
@@ -4905,7 +4905,20 @@ dnl
|
||||
AH_TOP([#ifndef SUDO_CONFIG_H
|
||||
#define SUDO_CONFIG_H])
|
||||
|
||||
AH_BOTTOM([/* BSD compatibility on some SVR4 systems. */
|
||||
AH_BOTTOM([/* Symbol visibility controls */
|
||||
#ifdef HAVE_DSO_VISIBILITY
|
||||
# if defined(__GNUC__)
|
||||
# define sudo_dso_public __attribute__((__visibility__("default")))
|
||||
# elif defined(__SUNPRO_C)
|
||||
# define sudo_dso_public __global
|
||||
# else
|
||||
# define sudo_dso_public __declspec(dllexport)
|
||||
# endif
|
||||
#else
|
||||
# define sudo_dso_public
|
||||
#endif
|
||||
|
||||
/* BSD compatibility on some SVR4 systems. */
|
||||
#ifdef __svr4__
|
||||
# define BSD_COMP
|
||||
#endif
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#define FNM_LEADING_DIR (1 << 3) /* Only match the leading directory */
|
||||
#define FNM_CASEFOLD (1 << 4) /* Case insensitive matching */
|
||||
|
||||
__dso_public int sudo_fnmatch(const char *pattern, const char *string, int flags);
|
||||
sudo_dso_public int sudo_fnmatch(const char *pattern, const char *string, int flags);
|
||||
|
||||
#define fnmatch(_a, _b, _c) sudo_fnmatch((_a), (_b), (_c))
|
||||
|
||||
|
@@ -66,10 +66,10 @@ struct addrinfo {
|
||||
#define EAI_OVERFLOW 10 /* An argument buffer overflowed */
|
||||
|
||||
/* Function prototypes. */
|
||||
__dso_public int sudo_getaddrinfo(const char *nodename, const char *servname,
|
||||
sudo_dso_public int sudo_getaddrinfo(const char *nodename, const char *servname,
|
||||
const struct addrinfo *hints, struct addrinfo **res);
|
||||
__dso_public void sudo_freeaddrinfo(struct addrinfo *ai);
|
||||
__dso_public const char *sudo_gai_strerror(int ecode);
|
||||
sudo_dso_public void sudo_freeaddrinfo(struct addrinfo *ai);
|
||||
sudo_dso_public const char *sudo_gai_strerror(int ecode);
|
||||
|
||||
/* Map sudo_* to RFC 3493 names. */
|
||||
#undef getaddrinfo
|
||||
|
@@ -57,19 +57,19 @@ struct option {
|
||||
int val;
|
||||
};
|
||||
|
||||
__dso_public int sudo_getopt_long(int, char * const *, const char *,
|
||||
sudo_dso_public int sudo_getopt_long(int, char * const *, const char *,
|
||||
const struct option *, int *);
|
||||
#undef getopt_long
|
||||
#define getopt_long(_a, _b, _c, _d, _e) \
|
||||
sudo_getopt_long((_a), (_b), (_c), (_d), (_e))
|
||||
|
||||
__dso_public int sudo_getopt_long_only(int, char * const *, const char *,
|
||||
sudo_dso_public int sudo_getopt_long_only(int, char * const *, const char *,
|
||||
const struct option *, int *);
|
||||
#undef getopt_long_only
|
||||
#define getopt_long_only(_a, _b, _c, _d, _e) \
|
||||
sudo_getopt_long_only((_a), (_b), (_c), (_d), (_e))
|
||||
#if 0
|
||||
__dso_public int sudo_getopt(int, char * const [], const char *);
|
||||
sudo_dso_public int sudo_getopt(int, char * const [], const char *);
|
||||
#undef getopt
|
||||
#define getopt(_a, _b, _c) sudo_getopt((_a), (_b), (_c))
|
||||
#endif
|
||||
|
@@ -69,8 +69,8 @@ typedef struct {
|
||||
#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK not set. */
|
||||
#define GLOB_NOSYS (-4) /* Function not supported. */
|
||||
|
||||
__dso_public int sudo_glob(const char *, int, int (*)(const char *, int), glob_t *);
|
||||
__dso_public void sudo_globfree(glob_t *);
|
||||
sudo_dso_public int sudo_glob(const char *, int, int (*)(const char *, int), glob_t *);
|
||||
sudo_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))
|
||||
|
@@ -49,11 +49,11 @@ typedef struct {
|
||||
uint8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
} SHA2_CTX;
|
||||
|
||||
__dso_public void sudo_SHA224Init(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA224Pad(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA224Transform(uint32_t state[8], const uint8_t buffer[SHA224_BLOCK_LENGTH]);
|
||||
__dso_public void sudo_SHA224Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void sudo_SHA224Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA224Init(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA224Pad(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA224Transform(uint32_t state[8], const uint8_t buffer[SHA224_BLOCK_LENGTH]);
|
||||
sudo_dso_public void sudo_SHA224Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
sudo_dso_public void sudo_SHA224Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
#define SHA224Init sudo_SHA224Init
|
||||
#define SHA224Pad sudo_SHA224Pad
|
||||
@@ -61,11 +61,11 @@ __dso_public void sudo_SHA224Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA2_CT
|
||||
#define SHA224Update sudo_SHA224Update
|
||||
#define SHA224Final sudo_SHA224Final
|
||||
|
||||
__dso_public void sudo_SHA256Init(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA256Pad(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA256Transform(uint32_t state[8], const uint8_t buffer[SHA256_BLOCK_LENGTH]);
|
||||
__dso_public void sudo_SHA256Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void sudo_SHA256Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA256Init(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA256Pad(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA256Transform(uint32_t state[8], const uint8_t buffer[SHA256_BLOCK_LENGTH]);
|
||||
sudo_dso_public void sudo_SHA256Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
sudo_dso_public void sudo_SHA256Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
#define SHA256Init sudo_SHA256Init
|
||||
#define SHA256Pad sudo_SHA256Pad
|
||||
@@ -73,11 +73,11 @@ __dso_public void sudo_SHA256Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA2_CT
|
||||
#define SHA256Update sudo_SHA256Update
|
||||
#define SHA256Final sudo_SHA256Final
|
||||
|
||||
__dso_public void sudo_SHA384Init(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA384Pad(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA384Transform(uint64_t state[8], const uint8_t buffer[SHA384_BLOCK_LENGTH]);
|
||||
__dso_public void sudo_SHA384Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void sudo_SHA384Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA384Init(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA384Pad(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA384Transform(uint64_t state[8], const uint8_t buffer[SHA384_BLOCK_LENGTH]);
|
||||
sudo_dso_public void sudo_SHA384Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
sudo_dso_public void sudo_SHA384Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
#define SHA384Init sudo_SHA384Init
|
||||
#define SHA384Pad sudo_SHA384Pad
|
||||
@@ -85,11 +85,11 @@ __dso_public void sudo_SHA384Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA2_CT
|
||||
#define SHA384Update sudo_SHA384Update
|
||||
#define SHA384Final sudo_SHA384Final
|
||||
|
||||
__dso_public void sudo_SHA512Init(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA512Pad(SHA2_CTX *ctx);
|
||||
__dso_public void sudo_SHA512Transform(uint64_t state[8], const uint8_t buffer[SHA512_BLOCK_LENGTH]);
|
||||
__dso_public void sudo_SHA512Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void sudo_SHA512Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA512Init(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA512Pad(SHA2_CTX *ctx);
|
||||
sudo_dso_public void sudo_SHA512Transform(uint64_t state[8], const uint8_t buffer[SHA512_BLOCK_LENGTH]);
|
||||
sudo_dso_public void sudo_SHA512Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
sudo_dso_public void sudo_SHA512Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
#define SHA512Init sudo_SHA512Init
|
||||
#define SHA512Pad sudo_SHA512Pad
|
||||
|
@@ -88,24 +88,6 @@
|
||||
# define __containerof(x, s, m) ((s *)((char *)(x) - offsetof(s, m)))
|
||||
#endif
|
||||
|
||||
#ifndef __dso_public
|
||||
# ifdef HAVE_DSO_VISIBILITY
|
||||
# if defined(__GNUC__)
|
||||
# define __dso_public __attribute__((__visibility__("default")))
|
||||
# define __dso_hidden __attribute__((__visibility__("hidden")))
|
||||
# elif defined(__SUNPRO_C)
|
||||
# define __dso_public __global
|
||||
# define __dso_hidden __hidden
|
||||
# else
|
||||
# define __dso_public __declspec(dllexport)
|
||||
# define __dso_hidden
|
||||
# endif
|
||||
# else
|
||||
# define __dso_public
|
||||
# define __dso_hidden
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Pre-C99 compilers may lack a va_copy macro.
|
||||
*/
|
||||
@@ -259,7 +241,7 @@
|
||||
* Simple isblank() macro and function for systems without it.
|
||||
*/
|
||||
#ifndef HAVE_ISBLANK
|
||||
__dso_public int isblank(int);
|
||||
sudo_dso_public int isblank(int);
|
||||
# define isblank(_x) ((_x) == ' ' || (_x) == '\t')
|
||||
#endif
|
||||
|
||||
@@ -427,37 +409,37 @@ struct timespec;
|
||||
struct termios;
|
||||
|
||||
#ifndef HAVE_CFMAKERAW
|
||||
__dso_public void sudo_cfmakeraw(struct termios *term);
|
||||
sudo_dso_public void sudo_cfmakeraw(struct termios *term);
|
||||
# undef cfmakeraw
|
||||
# define cfmakeraw(_a) sudo_cfmakeraw((_a))
|
||||
#endif /* HAVE_CFMAKERAW */
|
||||
#ifndef HAVE_CLOSEFROM
|
||||
__dso_public void sudo_closefrom(int);
|
||||
sudo_dso_public void sudo_closefrom(int);
|
||||
# undef closefrom
|
||||
# define closefrom(_a) sudo_closefrom((_a))
|
||||
#endif /* HAVE_CLOSEFROM */
|
||||
#ifndef HAVE_EXPLICIT_BZERO
|
||||
__dso_public void sudo_explicit_bzero(void *s, size_t n);
|
||||
sudo_dso_public void sudo_explicit_bzero(void *s, size_t n);
|
||||
# undef explicit_bzero
|
||||
# define explicit_bzero(_a, _b) sudo_explicit_bzero((_a), (_b))
|
||||
#endif /* HAVE_EXPLICIT_BZERO */
|
||||
#ifndef HAVE_FREEZERO
|
||||
__dso_public void sudo_freezero(void *p, size_t n);
|
||||
sudo_dso_public void sudo_freezero(void *p, size_t n);
|
||||
# undef freezero
|
||||
# define freezero(_a, _b) sudo_freezero((_a), (_b))
|
||||
#endif /* HAVE_FREEZERO */
|
||||
#ifdef PREFER_PORTABLE_GETCWD
|
||||
__dso_public char *sudo_getcwd(char *, size_t size);
|
||||
sudo_dso_public char *sudo_getcwd(char *, size_t size);
|
||||
# undef getcwd
|
||||
# define getcwd(_a, _b) sudo_getcwd((_a), (_b))
|
||||
#endif /* PREFER_PORTABLE_GETCWD */
|
||||
#ifndef HAVE_GETGROUPLIST
|
||||
__dso_public int sudo_getgrouplist(const char *name, GETGROUPS_T basegid, GETGROUPS_T *groups, int *ngroupsp);
|
||||
sudo_dso_public int sudo_getgrouplist(const char *name, GETGROUPS_T basegid, GETGROUPS_T *groups, int *ngroupsp);
|
||||
# undef getgrouplist
|
||||
# define getgrouplist(_a, _b, _c, _d) sudo_getgrouplist((_a), (_b), (_c), (_d))
|
||||
#endif /* GETGROUPLIST */
|
||||
#if !defined(HAVE_GETDELIM)
|
||||
__dso_public ssize_t sudo_getdelim(char **bufp, size_t *bufsizep, int delim, FILE *fp);
|
||||
sudo_dso_public ssize_t sudo_getdelim(char **bufp, size_t *bufsizep, int delim, FILE *fp);
|
||||
# undef getdelim
|
||||
# define getdelim(_a, _b, _c, _d) sudo_getdelim((_a), (_b), (_c), (_d))
|
||||
#elif defined(HAVE_DECL_GETDELIM) && !HAVE_DECL_GETDELIM
|
||||
@@ -465,156 +447,156 @@ __dso_public ssize_t sudo_getdelim(char **bufp, size_t *bufsizep, int delim, FIL
|
||||
ssize_t getdelim(char **bufp, size_t *bufsizep, int delim, FILE *fp);
|
||||
#endif /* HAVE_GETDELIM */
|
||||
#ifndef HAVE_GETUSERSHELL
|
||||
__dso_public char *sudo_getusershell(void);
|
||||
sudo_dso_public char *sudo_getusershell(void);
|
||||
# undef getusershell
|
||||
# define getusershell() sudo_getusershell()
|
||||
__dso_public void sudo_setusershell(void);
|
||||
sudo_dso_public void sudo_setusershell(void);
|
||||
# undef setusershell
|
||||
# define setusershell() sudo_setusershell()
|
||||
__dso_public void sudo_endusershell(void);
|
||||
sudo_dso_public void sudo_endusershell(void);
|
||||
# undef endusershell
|
||||
# define endusershell() sudo_endusershell()
|
||||
#endif /* HAVE_GETUSERSHELL */
|
||||
#ifndef HAVE_UTIMENSAT
|
||||
__dso_public int sudo_utimensat(int fd, const char *file, const struct timespec *times, int flag);
|
||||
sudo_dso_public int sudo_utimensat(int fd, const char *file, const struct timespec *times, int flag);
|
||||
# undef utimensat
|
||||
# define utimensat(_a, _b, _c, _d) sudo_utimensat((_a), (_b), (_c), (_d))
|
||||
#endif /* HAVE_UTIMENSAT */
|
||||
#ifndef HAVE_FCHMODAT
|
||||
__dso_public int sudo_fchmodat(int dfd, const char *path, mode_t mode, int flag);
|
||||
sudo_dso_public int sudo_fchmodat(int dfd, const char *path, mode_t mode, int flag);
|
||||
# undef fchmodat
|
||||
# define fchmodat(_a, _b, _c, _d) sudo_fchmodat((_a), (_b), (_c), (_d))
|
||||
#endif /* HAVE_FCHMODAT */
|
||||
#ifndef HAVE_FSTATAT
|
||||
__dso_public int sudo_fstatat(int dfd, const char *path, struct stat *sb, int flag);
|
||||
sudo_dso_public int sudo_fstatat(int dfd, const char *path, struct stat *sb, int flag);
|
||||
# undef fstatat
|
||||
# define fstatat(_a, _b, _c, _d) sudo_fstatat((_a), (_b), (_c), (_d))
|
||||
#endif /* HAVE_FSTATAT */
|
||||
#ifndef HAVE_FUTIMENS
|
||||
__dso_public int sudo_futimens(int fd, const struct timespec *times);
|
||||
sudo_dso_public int sudo_futimens(int fd, const struct timespec *times);
|
||||
# undef futimens
|
||||
# define futimens(_a, _b) sudo_futimens((_a), (_b))
|
||||
#endif /* HAVE_FUTIMENS */
|
||||
#if !defined(HAVE_SNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF)
|
||||
__dso_public int sudo_snprintf(char *str, size_t n, char const *fmt, ...) __printflike(3, 4);
|
||||
sudo_dso_public int sudo_snprintf(char *str, size_t n, char const *fmt, ...) __printflike(3, 4);
|
||||
# undef snprintf
|
||||
# define snprintf sudo_snprintf
|
||||
#endif /* HAVE_SNPRINTF */
|
||||
#if !defined(HAVE_VSNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF)
|
||||
__dso_public int sudo_vsnprintf(char *str, size_t n, const char *fmt, va_list ap) __printflike(3, 0);
|
||||
sudo_dso_public int sudo_vsnprintf(char *str, size_t n, const char *fmt, va_list ap) __printflike(3, 0);
|
||||
# undef vsnprintf
|
||||
# define vsnprintf sudo_vsnprintf
|
||||
#endif /* HAVE_VSNPRINTF */
|
||||
#if !defined(HAVE_ASPRINTF) || defined(PREFER_PORTABLE_SNPRINTF)
|
||||
__dso_public int sudo_asprintf(char **str, char const *fmt, ...) __printflike(2, 3);
|
||||
sudo_dso_public int sudo_asprintf(char **str, char const *fmt, ...) __printflike(2, 3);
|
||||
# undef asprintf
|
||||
# define asprintf sudo_asprintf
|
||||
#endif /* HAVE_ASPRINTF */
|
||||
#if !defined(HAVE_VASPRINTF) || defined(PREFER_PORTABLE_SNPRINTF)
|
||||
__dso_public int sudo_vasprintf(char **str, const char *fmt, va_list ap) __printflike(2, 0);
|
||||
sudo_dso_public int sudo_vasprintf(char **str, const char *fmt, va_list ap) __printflike(2, 0);
|
||||
# undef vasprintf
|
||||
# define vasprintf sudo_vasprintf
|
||||
#endif /* HAVE_VASPRINTF */
|
||||
#ifndef HAVE_STRLCAT
|
||||
__dso_public size_t sudo_strlcat(char *dst, const char *src, size_t siz);
|
||||
sudo_dso_public size_t sudo_strlcat(char *dst, const char *src, size_t siz);
|
||||
# undef strlcat
|
||||
# define strlcat(_a, _b, _c) sudo_strlcat((_a), (_b), (_c))
|
||||
#endif /* HAVE_STRLCAT */
|
||||
#ifndef HAVE_STRLCPY
|
||||
__dso_public size_t sudo_strlcpy(char *dst, const char *src, size_t siz);
|
||||
sudo_dso_public size_t sudo_strlcpy(char *dst, const char *src, size_t siz);
|
||||
# undef strlcpy
|
||||
# define strlcpy(_a, _b, _c) sudo_strlcpy((_a), (_b), (_c))
|
||||
#endif /* HAVE_STRLCPY */
|
||||
#ifndef HAVE_STRNDUP
|
||||
__dso_public char *sudo_strndup(const char *str, size_t maxlen);
|
||||
sudo_dso_public char *sudo_strndup(const char *str, size_t maxlen);
|
||||
# undef strndup
|
||||
# define strndup(_a, _b) sudo_strndup((_a), (_b))
|
||||
#endif /* HAVE_STRNDUP */
|
||||
#ifndef HAVE_STRNLEN
|
||||
__dso_public size_t sudo_strnlen(const char *str, size_t maxlen);
|
||||
sudo_dso_public size_t sudo_strnlen(const char *str, size_t maxlen);
|
||||
# undef strnlen
|
||||
# define strnlen(_a, _b) sudo_strnlen((_a), (_b))
|
||||
#endif /* HAVE_STRNLEN */
|
||||
#ifndef HAVE_MEMRCHR
|
||||
__dso_public void *sudo_memrchr(const void *s, int c, size_t n);
|
||||
sudo_dso_public void *sudo_memrchr(const void *s, int c, size_t n);
|
||||
# undef memrchr
|
||||
# define memrchr(_a, _b, _c) sudo_memrchr((_a), (_b), (_c))
|
||||
#endif /* HAVE_MEMRCHR */
|
||||
#if !defined(HAVE_MKDTEMP) || !defined(HAVE_MKSTEMPS)
|
||||
__dso_public char *sudo_mkdtemp(char *path);
|
||||
sudo_dso_public char *sudo_mkdtemp(char *path);
|
||||
# undef mkdtemp
|
||||
# define mkdtemp(_a) sudo_mkdtemp((_a))
|
||||
__dso_public int sudo_mkstemps(char *path, int slen);
|
||||
sudo_dso_public int sudo_mkstemps(char *path, int slen);
|
||||
# undef mkstemps
|
||||
# define mkstemps(_a, _b) sudo_mkstemps((_a), (_b))
|
||||
#endif /* !HAVE_MKDTEMP || !HAVE_MKSTEMPS */
|
||||
#ifndef HAVE_NANOSLEEP
|
||||
__dso_public int sudo_nanosleep(const struct timespec *timeout, struct timespec *remainder);
|
||||
sudo_dso_public int sudo_nanosleep(const struct timespec *timeout, struct timespec *remainder);
|
||||
#undef nanosleep
|
||||
# define nanosleep(_a, _b) sudo_nanosleep((_a), (_b))
|
||||
#endif /* HAVE_NANOSLEEP */
|
||||
#ifndef HAVE_OPENAT
|
||||
__dso_public int sudo_openat(int dfd, const char *path, int flags, mode_t mode);
|
||||
sudo_dso_public int sudo_openat(int dfd, const char *path, int flags, mode_t mode);
|
||||
# undef openat
|
||||
# define openat(_a, _b, _c, _d) sudo_openat((_a), (_b), (_c), (_d))
|
||||
#endif /* HAVE_OPENAT */
|
||||
#ifndef HAVE_PW_DUP
|
||||
__dso_public struct passwd *sudo_pw_dup(const struct passwd *pw);
|
||||
sudo_dso_public struct passwd *sudo_pw_dup(const struct passwd *pw);
|
||||
# undef pw_dup
|
||||
# define pw_dup(_a) sudo_pw_dup((_a))
|
||||
#endif /* HAVE_PW_DUP */
|
||||
#ifndef HAVE_STRSIGNAL
|
||||
__dso_public char *sudo_strsignal(int signo);
|
||||
sudo_dso_public char *sudo_strsignal(int signo);
|
||||
# undef strsignal
|
||||
# define strsignal(_a) sudo_strsignal((_a))
|
||||
#endif /* HAVE_STRSIGNAL */
|
||||
#ifndef HAVE_SIG2STR
|
||||
__dso_public int sudo_sig2str(int signo, char *signame);
|
||||
sudo_dso_public int sudo_sig2str(int signo, char *signame);
|
||||
# undef sig2str
|
||||
# define sig2str(_a, _b) sudo_sig2str((_a), (_b))
|
||||
#endif /* HAVE_SIG2STR */
|
||||
#ifndef HAVE_STR2SIG
|
||||
__dso_public int sudo_str2sig(const char *signame, int *signum);
|
||||
sudo_dso_public int sudo_str2sig(const char *signame, int *signum);
|
||||
# undef str2sig
|
||||
# define str2sig(_a, _b) sudo_str2sig((_a), (_b))
|
||||
#endif /* HAVE_STR2SIG */
|
||||
#if !defined(HAVE_INET_NTOP) && defined(NEED_INET_NTOP)
|
||||
__dso_public char *sudo_inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
||||
sudo_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))
|
||||
#endif /* HAVE_INET_NTOP */
|
||||
#ifndef HAVE_INET_PTON
|
||||
__dso_public int sudo_inet_pton(int af, const char *src, void *dst);
|
||||
sudo_dso_public int sudo_inet_pton(int af, const char *src, void *dst);
|
||||
# undef inet_pton
|
||||
# define inet_pton(_a, _b, _c) sudo_inet_pton((_a), (_b), (_c))
|
||||
#endif /* HAVE_INET_PTON */
|
||||
#ifndef HAVE_GETPROGNAME
|
||||
__dso_public const char *sudo_getprogname(void);
|
||||
sudo_dso_public const char *sudo_getprogname(void);
|
||||
# undef getprogname
|
||||
# define getprogname() sudo_getprogname()
|
||||
#endif /* HAVE_GETPROGNAME */
|
||||
#ifndef HAVE_REALLOCARRAY
|
||||
__dso_public void *sudo_reallocarray(void *ptr, size_t nmemb, size_t size);
|
||||
sudo_dso_public void *sudo_reallocarray(void *ptr, size_t nmemb, size_t size);
|
||||
# undef reallocarray
|
||||
# define reallocarray(_a, _b, _c) sudo_reallocarray((_a), (_b), (_c))
|
||||
#endif /* HAVE_REALLOCARRAY */
|
||||
#ifndef HAVE_VSYSLOG
|
||||
__dso_public void sudo_vsyslog(int pri, const char *fmt, va_list ap);
|
||||
sudo_dso_public void sudo_vsyslog(int pri, const char *fmt, va_list ap);
|
||||
# undef vsyslog
|
||||
# define vsyslog(_a, _b, _c) sudo_vsyslog((_a), (_b), (_c))
|
||||
#endif /* HAVE_VSYSLOG */
|
||||
#ifndef HAVE_DUP3
|
||||
__dso_public int sudo_dup3(int oldd, int newd, int flags);
|
||||
sudo_dso_public int sudo_dup3(int oldd, int newd, int flags);
|
||||
# undef dup3
|
||||
# define dup3(_a, _b, _c) sudo_dup3((_a), (_b), (_c))
|
||||
#endif /* HAVE_DUP3 */
|
||||
#ifndef HAVE_PIPE2
|
||||
__dso_public int sudo_pipe2(int fildes[2], int flags);
|
||||
sudo_dso_public int sudo_pipe2(int fildes[2], int flags);
|
||||
# undef pipe2
|
||||
# define pipe2(_a, _b) sudo_pipe2((_a), (_b))
|
||||
#endif /* HAVE_PIPE2 */
|
||||
#ifndef HAVE_UNLINKAT
|
||||
__dso_public int sudo_unlinkat(int dfd, const char *path, int flag);
|
||||
sudo_dso_public int sudo_unlinkat(int dfd, const char *path, int flag);
|
||||
# undef unlinkat
|
||||
# define unlinkat(_a, _b, _c) sudo_unlinkat((_a), (_b), (_c))
|
||||
#endif /* HAVE_UNLINKAT */
|
||||
|
@@ -59,24 +59,24 @@ struct sudo_conf_debug {
|
||||
TAILQ_HEAD(sudo_conf_debug_list, sudo_conf_debug);
|
||||
|
||||
/* Read main sudo.conf file. */
|
||||
__dso_public int sudo_conf_read_v1(const char *conf_file, int conf_types);
|
||||
sudo_dso_public int sudo_conf_read_v1(const char *conf_file, int conf_types);
|
||||
#define sudo_conf_read(_a, _b) sudo_conf_read_v1((_a), (_b))
|
||||
|
||||
/* Accessor functions. */
|
||||
__dso_public const char *sudo_conf_askpass_path_v1(void);
|
||||
__dso_public const char *sudo_conf_sesh_path_v1(void);
|
||||
__dso_public const char *sudo_conf_noexec_path_v1(void);
|
||||
__dso_public const char *sudo_conf_plugin_dir_path_v1(void);
|
||||
__dso_public const char *sudo_conf_devsearch_path_v1(void);
|
||||
__dso_public struct sudo_conf_debug_list *sudo_conf_debugging_v1(void);
|
||||
__dso_public struct sudo_conf_debug_file_list *sudo_conf_debug_files_v1(const char *progname);
|
||||
__dso_public struct plugin_info_list *sudo_conf_plugins_v1(void);
|
||||
__dso_public bool sudo_conf_disable_coredump_v1(void);
|
||||
__dso_public bool sudo_conf_developer_mode_v1(void);
|
||||
__dso_public bool sudo_conf_probe_interfaces_v1(void);
|
||||
__dso_public int sudo_conf_group_source_v1(void);
|
||||
__dso_public int sudo_conf_max_groups_v1(void);
|
||||
__dso_public void sudo_conf_clear_paths_v1(void);
|
||||
sudo_dso_public const char *sudo_conf_askpass_path_v1(void);
|
||||
sudo_dso_public const char *sudo_conf_sesh_path_v1(void);
|
||||
sudo_dso_public const char *sudo_conf_noexec_path_v1(void);
|
||||
sudo_dso_public const char *sudo_conf_plugin_dir_path_v1(void);
|
||||
sudo_dso_public const char *sudo_conf_devsearch_path_v1(void);
|
||||
sudo_dso_public struct sudo_conf_debug_list *sudo_conf_debugging_v1(void);
|
||||
sudo_dso_public struct sudo_conf_debug_file_list *sudo_conf_debug_files_v1(const char *progname);
|
||||
sudo_dso_public struct plugin_info_list *sudo_conf_plugins_v1(void);
|
||||
sudo_dso_public bool sudo_conf_disable_coredump_v1(void);
|
||||
sudo_dso_public bool sudo_conf_developer_mode_v1(void);
|
||||
sudo_dso_public bool sudo_conf_probe_interfaces_v1(void);
|
||||
sudo_dso_public int sudo_conf_group_source_v1(void);
|
||||
sudo_dso_public int sudo_conf_max_groups_v1(void);
|
||||
sudo_dso_public void sudo_conf_clear_paths_v1(void);
|
||||
#define sudo_conf_askpass_path() sudo_conf_askpass_path_v1()
|
||||
#define sudo_conf_sesh_path() sudo_conf_sesh_path_v1()
|
||||
#define sudo_conf_noexec_path() sudo_conf_noexec_path_v1()
|
||||
|
@@ -245,33 +245,33 @@ struct sudo_conf_debug_file_list;
|
||||
#define sudo_debug_write(fd, str, len, errnum) \
|
||||
sudo_debug_write2(fd, NULL, NULL, 0, (str), (len), (errnum))
|
||||
|
||||
__dso_public int sudo_debug_deregister_v1(int instance_id);
|
||||
__dso_public void sudo_debug_enter_v1(const char *func, const char *file, int line, int subsys);
|
||||
__dso_public void sudo_debug_execve2_v1(int level, const char *path, char *const argv[], char *const envp[]);
|
||||
__dso_public void sudo_debug_exit_v1(const char *func, const char *file, int line, int subsys);
|
||||
__dso_public void sudo_debug_exit_bool_v1(const char *func, const char *file, int line, int subsys, bool ret);
|
||||
__dso_public void sudo_debug_exit_int_v1(const char *func, const char *file, int line, int subsys, int ret);
|
||||
__dso_public void sudo_debug_exit_long_v1(const char *func, const char *file, int line, int subsys, long ret);
|
||||
__dso_public void sudo_debug_exit_ptr_v1(const char *func, const char *file, int line, int subsys, const void *ret);
|
||||
__dso_public void sudo_debug_exit_id_t_v1(const char *func, const char *file, int line, int subsys, id_t ret);
|
||||
__dso_public void sudo_debug_exit_size_t_v1(const char *func, const char *file, int line, int subsys, size_t ret);
|
||||
__dso_public void sudo_debug_exit_ssize_t_v1(const char *func, const char *file, int line, int subsys, ssize_t ret);
|
||||
__dso_public void sudo_debug_exit_str_v1(const char *func, const char *file, int line, int subsys, const char *ret);
|
||||
__dso_public void sudo_debug_exit_str_masked_v1(const char *func, const char *file, int line, int subsys, const char *ret);
|
||||
__dso_public void sudo_debug_exit_time_t_v1(const char *func, const char *file, int line, int subsys, time_t ret);
|
||||
__dso_public pid_t sudo_debug_fork_v1(void);
|
||||
__dso_public int sudo_debug_get_active_instance_v1(void);
|
||||
__dso_public int sudo_debug_get_fds_v1(unsigned char **fds);
|
||||
__dso_public int sudo_debug_get_instance_v1(const char *program);
|
||||
__dso_public int sudo_debug_parse_flags_v1(struct sudo_conf_debug_file_list *debug_files, const char *entry);
|
||||
__dso_public void sudo_debug_printf2_v1(const char *func, const char *file, int line, int level, const char *fmt, ...) __printf0like(5, 6);
|
||||
__dso_public void sudo_debug_printf_nvm_v1(int pri, const char *fmt, ...) __printf0like(2, 3);
|
||||
__dso_public int sudo_debug_register_v1(const char *program, const char *const subsystems[], unsigned int ids[], struct sudo_conf_debug_file_list *debug_files);
|
||||
__dso_public int sudo_debug_set_active_instance_v1(int inst);
|
||||
__dso_public void sudo_debug_update_fd_v1(int ofd, int nfd);
|
||||
__dso_public void sudo_debug_vprintf2_v1(const char *func, const char *file, int line, int level, const char *fmt, va_list ap) __printf0like(5, 0);
|
||||
__dso_public void sudo_debug_write2_v1(int fd, const char *func, const char *file, int line, const char *str, int len, int errnum);
|
||||
__dso_public bool sudo_debug_needed_v1(int level);
|
||||
sudo_dso_public int sudo_debug_deregister_v1(int instance_id);
|
||||
sudo_dso_public void sudo_debug_enter_v1(const char *func, const char *file, int line, int subsys);
|
||||
sudo_dso_public void sudo_debug_execve2_v1(int level, const char *path, char *const argv[], char *const envp[]);
|
||||
sudo_dso_public void sudo_debug_exit_v1(const char *func, const char *file, int line, int subsys);
|
||||
sudo_dso_public void sudo_debug_exit_bool_v1(const char *func, const char *file, int line, int subsys, bool ret);
|
||||
sudo_dso_public void sudo_debug_exit_int_v1(const char *func, const char *file, int line, int subsys, int ret);
|
||||
sudo_dso_public void sudo_debug_exit_long_v1(const char *func, const char *file, int line, int subsys, long ret);
|
||||
sudo_dso_public void sudo_debug_exit_ptr_v1(const char *func, const char *file, int line, int subsys, const void *ret);
|
||||
sudo_dso_public void sudo_debug_exit_id_t_v1(const char *func, const char *file, int line, int subsys, id_t ret);
|
||||
sudo_dso_public void sudo_debug_exit_size_t_v1(const char *func, const char *file, int line, int subsys, size_t ret);
|
||||
sudo_dso_public void sudo_debug_exit_ssize_t_v1(const char *func, const char *file, int line, int subsys, ssize_t ret);
|
||||
sudo_dso_public void sudo_debug_exit_str_v1(const char *func, const char *file, int line, int subsys, const char *ret);
|
||||
sudo_dso_public void sudo_debug_exit_str_masked_v1(const char *func, const char *file, int line, int subsys, const char *ret);
|
||||
sudo_dso_public void sudo_debug_exit_time_t_v1(const char *func, const char *file, int line, int subsys, time_t ret);
|
||||
sudo_dso_public pid_t sudo_debug_fork_v1(void);
|
||||
sudo_dso_public int sudo_debug_get_active_instance_v1(void);
|
||||
sudo_dso_public int sudo_debug_get_fds_v1(unsigned char **fds);
|
||||
sudo_dso_public int sudo_debug_get_instance_v1(const char *program);
|
||||
sudo_dso_public int sudo_debug_parse_flags_v1(struct sudo_conf_debug_file_list *debug_files, const char *entry);
|
||||
sudo_dso_public void sudo_debug_printf2_v1(const char *func, const char *file, int line, int level, const char *fmt, ...) __printf0like(5, 6);
|
||||
sudo_dso_public void sudo_debug_printf_nvm_v1(int pri, const char *fmt, ...) __printf0like(2, 3);
|
||||
sudo_dso_public int sudo_debug_register_v1(const char *program, const char *const subsystems[], unsigned int ids[], struct sudo_conf_debug_file_list *debug_files);
|
||||
sudo_dso_public int sudo_debug_set_active_instance_v1(int inst);
|
||||
sudo_dso_public void sudo_debug_update_fd_v1(int ofd, int nfd);
|
||||
sudo_dso_public void sudo_debug_vprintf2_v1(const char *func, const char *file, int line, int level, const char *fmt, va_list ap) __printf0like(5, 0);
|
||||
sudo_dso_public void sudo_debug_write2_v1(int fd, const char *func, const char *file, int line, const char *str, int len, int errnum);
|
||||
sudo_dso_public bool sudo_debug_needed_v1(int level);
|
||||
|
||||
#define sudo_debug_needed(level) sudo_debug_needed_v1((level)|sudo_debug_subsys)
|
||||
#define sudo_debug_deregister(_a) sudo_debug_deregister_v1((_a))
|
||||
|
@@ -29,12 +29,12 @@
|
||||
struct sudo_digest;
|
||||
|
||||
/* Public functions. */
|
||||
__dso_public struct sudo_digest *sudo_digest_alloc_v1(int digest_type);
|
||||
__dso_public void sudo_digest_free_v1(struct sudo_digest *dig);
|
||||
__dso_public void sudo_digest_reset_v1(struct sudo_digest *dig);
|
||||
__dso_public int sudo_digest_getlen_v1(int digest_type);
|
||||
__dso_public void sudo_digest_update_v1(struct sudo_digest *dig, const void *data, size_t len);
|
||||
__dso_public void sudo_digest_final_v1(struct sudo_digest *dig, unsigned char *md);
|
||||
sudo_dso_public struct sudo_digest *sudo_digest_alloc_v1(int digest_type);
|
||||
sudo_dso_public void sudo_digest_free_v1(struct sudo_digest *dig);
|
||||
sudo_dso_public void sudo_digest_reset_v1(struct sudo_digest *dig);
|
||||
sudo_dso_public int sudo_digest_getlen_v1(int digest_type);
|
||||
sudo_dso_public void sudo_digest_update_v1(struct sudo_digest *dig, const void *data, size_t len);
|
||||
sudo_dso_public void sudo_digest_final_v1(struct sudo_digest *dig, unsigned char *md);
|
||||
|
||||
#define sudo_digest_alloc(_a) sudo_digest_alloc_v1((_a))
|
||||
#define sudo_digest_free(_a) sudo_digest_free_v1((_a))
|
||||
|
@@ -42,11 +42,11 @@ struct sudo_preload_table {
|
||||
};
|
||||
|
||||
/* Public functions. */
|
||||
__dso_public char *sudo_dso_strerror_v1(void);
|
||||
__dso_public int sudo_dso_unload_v1(void *handle);
|
||||
__dso_public void *sudo_dso_findsym_v1(void *handle, const char *symbol);
|
||||
__dso_public void *sudo_dso_load_v1(const char *path, int mode);
|
||||
__dso_public void sudo_dso_preload_table_v1(struct sudo_preload_table *table);
|
||||
sudo_dso_public char *sudo_dso_strerror_v1(void);
|
||||
sudo_dso_public int sudo_dso_unload_v1(void *handle);
|
||||
sudo_dso_public void *sudo_dso_findsym_v1(void *handle, const char *symbol);
|
||||
sudo_dso_public void *sudo_dso_load_v1(const char *path, int mode);
|
||||
sudo_dso_public void sudo_dso_preload_table_v1(struct sudo_preload_table *table);
|
||||
|
||||
#define sudo_dso_strerror() sudo_dso_strerror_v1()
|
||||
#define sudo_dso_unload(_a) sudo_dso_unload_v1((_a))
|
||||
|
@@ -113,73 +113,73 @@ struct sudo_event_base {
|
||||
};
|
||||
|
||||
/* Allocate a new event base. */
|
||||
__dso_public struct sudo_event_base *sudo_ev_base_alloc_v1(void);
|
||||
sudo_dso_public struct sudo_event_base *sudo_ev_base_alloc_v1(void);
|
||||
#define sudo_ev_base_alloc() sudo_ev_base_alloc_v1()
|
||||
|
||||
/* Free an event base. */
|
||||
__dso_public void sudo_ev_base_free_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public void sudo_ev_base_free_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_base_free(_a) sudo_ev_base_free_v1((_a))
|
||||
|
||||
/* Set the default event base. */
|
||||
__dso_public void sudo_ev_base_setdef_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public void sudo_ev_base_setdef_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_base_setdef(_a) sudo_ev_base_setdef_v1((_a))
|
||||
|
||||
/* Allocate a new event. */
|
||||
__dso_public struct sudo_event *sudo_ev_alloc_v1(int fd, short events, sudo_ev_callback_t callback, void *closure);
|
||||
sudo_dso_public struct sudo_event *sudo_ev_alloc_v1(int fd, short events, sudo_ev_callback_t callback, void *closure);
|
||||
#define sudo_ev_alloc(_a, _b, _c, _d) sudo_ev_alloc_v1((_a), (_b), (_c), (_d))
|
||||
|
||||
/* Free an event. */
|
||||
__dso_public void sudo_ev_free_v1(struct sudo_event *ev);
|
||||
sudo_dso_public void sudo_ev_free_v1(struct sudo_event *ev);
|
||||
#define sudo_ev_free(_a) sudo_ev_free_v1((_a))
|
||||
|
||||
/* Set an event struct that was pre-allocated. */
|
||||
__dso_public int sudo_ev_set_v1(struct sudo_event *ev, int fd, short events, sudo_ev_callback_t callback, void *closure);
|
||||
sudo_dso_public int sudo_ev_set_v1(struct sudo_event *ev, int fd, short events, sudo_ev_callback_t callback, void *closure);
|
||||
#define sudo_ev_set(_a, _b, _c, _d, _e) sudo_ev_set_v1((_a), (_b), (_c), (_d), (_e))
|
||||
|
||||
/* Add an event, returns 0 on success, -1 on error */
|
||||
__dso_public int sudo_ev_add_v1(struct sudo_event_base *head, struct sudo_event *ev, const struct timeval *timo, bool tohead);
|
||||
__dso_public int sudo_ev_add_v2(struct sudo_event_base *head, struct sudo_event *ev, const struct timespec *timo, bool tohead);
|
||||
sudo_dso_public int sudo_ev_add_v1(struct sudo_event_base *head, struct sudo_event *ev, const struct timeval *timo, bool tohead);
|
||||
sudo_dso_public int sudo_ev_add_v2(struct sudo_event_base *head, struct sudo_event *ev, const struct timespec *timo, bool tohead);
|
||||
#define sudo_ev_add(_a, _b, _c, _d) sudo_ev_add_v2((_a), (_b), (_c), (_d))
|
||||
|
||||
/* Delete an event, returns 0 on success, -1 on error */
|
||||
__dso_public int sudo_ev_del_v1(struct sudo_event_base *head, struct sudo_event *ev);
|
||||
sudo_dso_public int sudo_ev_del_v1(struct sudo_event_base *head, struct sudo_event *ev);
|
||||
#define sudo_ev_del(_a, _b) sudo_ev_del_v1((_a), (_b))
|
||||
|
||||
/* Dispatch events, returns SUDO_CB_SUCCESS, SUDO_CB_BREAK or SUDO_CB_ERROR */
|
||||
__dso_public int sudo_ev_dispatch_v1(struct sudo_event_base *head);
|
||||
sudo_dso_public int sudo_ev_dispatch_v1(struct sudo_event_base *head);
|
||||
#define sudo_ev_dispatch(_a) sudo_ev_dispatch_v1((_a))
|
||||
|
||||
/* Main event loop, returns SUDO_CB_SUCCESS, SUDO_CB_BREAK or SUDO_CB_ERROR */
|
||||
__dso_public int sudo_ev_loop_v1(struct sudo_event_base *head, int flags);
|
||||
sudo_dso_public int sudo_ev_loop_v1(struct sudo_event_base *head, int flags);
|
||||
#define sudo_ev_loop(_a, _b) sudo_ev_loop_v1((_a), (_b))
|
||||
|
||||
/* Return pending event types, fills in ts if non-NULL and there is a timeout */
|
||||
__dso_public int sudo_ev_pending_v1(struct sudo_event *ev, short events, struct timespec *ts);
|
||||
sudo_dso_public int sudo_ev_pending_v1(struct sudo_event *ev, short events, struct timespec *ts);
|
||||
#define sudo_ev_pending(_a, _b, _c) sudo_ev_pending_v1((_a), (_b), (_c))
|
||||
|
||||
/* Return the remaining timeout associated with an event (deprecated). */
|
||||
__dso_public int sudo_ev_get_timeleft_v1(struct sudo_event *ev, struct timeval *tv);
|
||||
__dso_public int sudo_ev_get_timeleft_v2(struct sudo_event *ev, struct timespec *tv);
|
||||
sudo_dso_public int sudo_ev_get_timeleft_v1(struct sudo_event *ev, struct timeval *tv);
|
||||
sudo_dso_public int sudo_ev_get_timeleft_v2(struct sudo_event *ev, struct timespec *tv);
|
||||
#define sudo_ev_get_timeleft(_a, _b) sudo_ev_get_timeleft_v2((_a), (_b))
|
||||
|
||||
/* Cause the event loop to exit after one run through. */
|
||||
__dso_public void sudo_ev_loopexit_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public void sudo_ev_loopexit_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_loopexit(_a) sudo_ev_loopexit_v1((_a))
|
||||
|
||||
/* Break out of the event loop right now. */
|
||||
__dso_public void sudo_ev_loopbreak_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public void sudo_ev_loopbreak_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_loopbreak(_a) sudo_ev_loopbreak_v1((_a))
|
||||
|
||||
/* Rescan for events and restart the event loop. */
|
||||
__dso_public void sudo_ev_loopcontinue_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public void sudo_ev_loopcontinue_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_loopcontinue(_a) sudo_ev_loopcontinue_v1((_a))
|
||||
|
||||
/* Returns true if event loop stopped due to sudo_ev_loopexit(). */
|
||||
__dso_public bool sudo_ev_got_exit_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public bool sudo_ev_got_exit_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_got_exit(_a) sudo_ev_got_exit_v1((_a))
|
||||
|
||||
/* Returns true if event loop stopped due to sudo_ev_loopbreak(). */
|
||||
__dso_public bool sudo_ev_got_break_v1(struct sudo_event_base *base);
|
||||
sudo_dso_public bool sudo_ev_got_break_v1(struct sudo_event_base *base);
|
||||
#define sudo_ev_got_break(_a) sudo_ev_got_break_v1((_a))
|
||||
|
||||
/* Return the fd associated with an event. */
|
||||
|
@@ -163,23 +163,23 @@ struct sudo_conv_message;
|
||||
struct sudo_conv_reply;
|
||||
struct sudo_conv_callback;
|
||||
|
||||
__dso_public int sudo_fatal_callback_deregister_v1(sudo_fatal_callback_t func);
|
||||
__dso_public int sudo_fatal_callback_register_v1(sudo_fatal_callback_t func);
|
||||
__dso_public char *sudo_warn_gettext_v1(const char *domainname, const char *msgid) __format_arg(2);
|
||||
__dso_public void sudo_warn_set_locale_func_v1(bool (*func)(bool, int *));
|
||||
__dso_public void sudo_fatal_nodebug_v1(const char *fmt, ...) __printf0like(1, 2) __attribute__((__noreturn__));
|
||||
__dso_public void sudo_fatalx_nodebug_v1(const char *fmt, ...) __printflike(1, 2) __attribute__((__noreturn__));
|
||||
__dso_public void sudo_gai_fatal_nodebug_v1(int errnum, const char *fmt, ...) __printflike(2, 3) __attribute__((__noreturn__));
|
||||
__dso_public void sudo_vfatal_nodebug_v1(const char *fmt, va_list ap) __printf0like(1, 0) __attribute__((__noreturn__));
|
||||
__dso_public void sudo_vfatalx_nodebug_v1(const char *fmt, va_list ap) __printflike(1, 0) __attribute__((__noreturn__));
|
||||
__dso_public void sudo_gai_vfatal_nodebug_v1(int errnum, const char *fmt, va_list ap) __printflike(2, 0) __attribute__((__noreturn__));
|
||||
__dso_public void sudo_warn_nodebug_v1(const char *fmt, ...) __printf0like(1, 2);
|
||||
__dso_public void sudo_warnx_nodebug_v1(const char *fmt, ...) __printflike(1, 2);
|
||||
__dso_public void sudo_gai_warn_nodebug_v1(int errnum, const char *fmt, ...) __printflike(2, 3);
|
||||
__dso_public void sudo_vwarn_nodebug_v1(const char *fmt, va_list ap) __printf0like(1, 0);
|
||||
__dso_public void sudo_vwarnx_nodebug_v1(const char *fmt, va_list ap) __printflike(1, 0);
|
||||
__dso_public void sudo_gai_vwarn_nodebug_v1(int errnum, const char *fmt, va_list ap) __printflike(2, 0);
|
||||
__dso_public void sudo_warn_set_conversation_v1(int (*conv)(int num_msgs, const struct sudo_conv_message *msgs, struct sudo_conv_reply *replies, struct sudo_conv_callback *callback));
|
||||
sudo_dso_public int sudo_fatal_callback_deregister_v1(sudo_fatal_callback_t func);
|
||||
sudo_dso_public int sudo_fatal_callback_register_v1(sudo_fatal_callback_t func);
|
||||
sudo_dso_public char *sudo_warn_gettext_v1(const char *domainname, const char *msgid) __format_arg(2);
|
||||
sudo_dso_public void sudo_warn_set_locale_func_v1(bool (*func)(bool, int *));
|
||||
sudo_dso_public void sudo_fatal_nodebug_v1(const char *fmt, ...) __printf0like(1, 2) __attribute__((__noreturn__));
|
||||
sudo_dso_public void sudo_fatalx_nodebug_v1(const char *fmt, ...) __printflike(1, 2) __attribute__((__noreturn__));
|
||||
sudo_dso_public void sudo_gai_fatal_nodebug_v1(int errnum, const char *fmt, ...) __printflike(2, 3) __attribute__((__noreturn__));
|
||||
sudo_dso_public void sudo_vfatal_nodebug_v1(const char *fmt, va_list ap) __printf0like(1, 0) __attribute__((__noreturn__));
|
||||
sudo_dso_public void sudo_vfatalx_nodebug_v1(const char *fmt, va_list ap) __printflike(1, 0) __attribute__((__noreturn__));
|
||||
sudo_dso_public void sudo_gai_vfatal_nodebug_v1(int errnum, const char *fmt, va_list ap) __printflike(2, 0) __attribute__((__noreturn__));
|
||||
sudo_dso_public void sudo_warn_nodebug_v1(const char *fmt, ...) __printf0like(1, 2);
|
||||
sudo_dso_public void sudo_warnx_nodebug_v1(const char *fmt, ...) __printflike(1, 2);
|
||||
sudo_dso_public void sudo_gai_warn_nodebug_v1(int errnum, const char *fmt, ...) __printflike(2, 3);
|
||||
sudo_dso_public void sudo_vwarn_nodebug_v1(const char *fmt, va_list ap) __printf0like(1, 0);
|
||||
sudo_dso_public void sudo_vwarnx_nodebug_v1(const char *fmt, va_list ap) __printflike(1, 0);
|
||||
sudo_dso_public void sudo_gai_vwarn_nodebug_v1(int errnum, const char *fmt, va_list ap) __printflike(2, 0);
|
||||
sudo_dso_public void sudo_warn_set_conversation_v1(int (*conv)(int num_msgs, const struct sudo_conv_message *msgs, struct sudo_conv_reply *replies, struct sudo_conv_callback *callback));
|
||||
|
||||
#define sudo_fatal_callback_deregister(_a) sudo_fatal_callback_deregister_v1((_a))
|
||||
#define sudo_fatal_callback_register(_a) sudo_fatal_callback_register_v1((_a))
|
||||
|
@@ -65,34 +65,34 @@ struct json_container {
|
||||
bool need_comma;
|
||||
};
|
||||
|
||||
__dso_public bool sudo_json_init_v1(struct json_container *json, int indent, bool compact, bool memfatal);
|
||||
sudo_dso_public bool sudo_json_init_v1(struct json_container *json, int indent, bool compact, bool memfatal);
|
||||
#define sudo_json_init(_a, _b, _c, _d) sudo_json_init_v1((_a), (_b), (_c), (_d))
|
||||
|
||||
__dso_public void sudo_json_free_v1(struct json_container *json);
|
||||
sudo_dso_public void sudo_json_free_v1(struct json_container *json);
|
||||
#define sudo_json_free(_a) sudo_json_free_v1((_a))
|
||||
|
||||
__dso_public bool sudo_json_open_object_v1(struct json_container *json, const char *name);
|
||||
sudo_dso_public bool sudo_json_open_object_v1(struct json_container *json, const char *name);
|
||||
#define sudo_json_open_object(_a, _b) sudo_json_open_object_v1((_a), (_b))
|
||||
|
||||
__dso_public bool sudo_json_close_object_v1(struct json_container *json);
|
||||
sudo_dso_public bool sudo_json_close_object_v1(struct json_container *json);
|
||||
#define sudo_json_close_object(_a) sudo_json_close_object_v1((_a))
|
||||
|
||||
__dso_public bool sudo_json_open_array_v1(struct json_container *json, const char *name);
|
||||
sudo_dso_public bool sudo_json_open_array_v1(struct json_container *json, const char *name);
|
||||
#define sudo_json_open_array(_a, _b) sudo_json_open_array_v1((_a), (_b))
|
||||
|
||||
__dso_public bool sudo_json_close_array_v1(struct json_container *json);
|
||||
sudo_dso_public bool sudo_json_close_array_v1(struct json_container *json);
|
||||
#define sudo_json_close_array(_a) sudo_json_close_array_v1((_a))
|
||||
|
||||
__dso_public bool sudo_json_add_value_v1(struct json_container *json, const char *name, struct json_value *value);
|
||||
sudo_dso_public bool sudo_json_add_value_v1(struct json_container *json, const char *name, struct json_value *value);
|
||||
#define sudo_json_add_value(_a, _b, _c) sudo_json_add_value_v1((_a), (_b), (_c))
|
||||
|
||||
__dso_public bool sudo_json_add_value_as_object_v1(struct json_container *json, const char *name, struct json_value *value);
|
||||
sudo_dso_public bool sudo_json_add_value_as_object_v1(struct json_container *json, const char *name, struct json_value *value);
|
||||
#define sudo_json_add_value_as_object(_a, _b, _c) sudo_json_add_value_as_object_v1((_a), (_b), (_c))
|
||||
|
||||
__dso_public char *sudo_json_get_buf_v1(struct json_container *json);
|
||||
sudo_dso_public char *sudo_json_get_buf_v1(struct json_container *json);
|
||||
#define sudo_json_get_buf(_a) sudo_json_get_buf_v1((_a))
|
||||
|
||||
__dso_public unsigned int sudo_json_get_len_v1(struct json_container *json);
|
||||
sudo_dso_public unsigned int sudo_json_get_len_v1(struct json_container *json);
|
||||
#define sudo_json_get_len(_a) sudo_json_get_len_v1((_a))
|
||||
|
||||
#endif /* SUDO_JSON_H */
|
||||
|
@@ -36,13 +36,13 @@ struct sudo_lbuf {
|
||||
|
||||
typedef int (*sudo_lbuf_output_t)(const char *);
|
||||
|
||||
__dso_public void sudo_lbuf_init_v1(struct sudo_lbuf *lbuf, sudo_lbuf_output_t output, int indent, const char *continuation, int cols);
|
||||
__dso_public void sudo_lbuf_destroy_v1(struct sudo_lbuf *lbuf);
|
||||
__dso_public bool sudo_lbuf_append_v1(struct sudo_lbuf *lbuf, const char *fmt, ...) __printflike(2, 3);
|
||||
__dso_public bool sudo_lbuf_append_quoted_v1(struct sudo_lbuf *lbuf, const char *set, const char *fmt, ...) __printflike(3, 4);
|
||||
__dso_public void sudo_lbuf_print_v1(struct sudo_lbuf *lbuf);
|
||||
__dso_public bool sudo_lbuf_error_v1(struct sudo_lbuf *lbuf);
|
||||
__dso_public void sudo_lbuf_clearerr_v1(struct sudo_lbuf *lbuf);
|
||||
sudo_dso_public void sudo_lbuf_init_v1(struct sudo_lbuf *lbuf, sudo_lbuf_output_t output, int indent, const char *continuation, int cols);
|
||||
sudo_dso_public void sudo_lbuf_destroy_v1(struct sudo_lbuf *lbuf);
|
||||
sudo_dso_public bool sudo_lbuf_append_v1(struct sudo_lbuf *lbuf, const char *fmt, ...) __printflike(2, 3);
|
||||
sudo_dso_public bool sudo_lbuf_append_quoted_v1(struct sudo_lbuf *lbuf, const char *set, const char *fmt, ...) __printflike(3, 4);
|
||||
sudo_dso_public void sudo_lbuf_print_v1(struct sudo_lbuf *lbuf);
|
||||
sudo_dso_public bool sudo_lbuf_error_v1(struct sudo_lbuf *lbuf);
|
||||
sudo_dso_public void sudo_lbuf_clearerr_v1(struct sudo_lbuf *lbuf);
|
||||
|
||||
#define sudo_lbuf_init(_a, _b, _c, _d, _e) sudo_lbuf_init_v1((_a), (_b), (_c), (_d), (_e))
|
||||
#define sudo_lbuf_destroy(_a) sudo_lbuf_destroy_v1((_a))
|
||||
|
@@ -30,19 +30,19 @@
|
||||
*/
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
__dso_public uint32_t sudo_arc4random(void);
|
||||
sudo_dso_public uint32_t sudo_arc4random(void);
|
||||
# undef arc4random
|
||||
# define arc4random() sudo_arc4random()
|
||||
#endif /* ARC4RANDOM */
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM_BUF
|
||||
__dso_public void sudo_arc4random_buf(void *buf, size_t n);
|
||||
sudo_dso_public void sudo_arc4random_buf(void *buf, size_t n);
|
||||
# undef arc4random_buf
|
||||
# define arc4random_buf(a, b) sudo_arc4random_buf((a), (b))
|
||||
#endif /* ARC4RANDOM_BUF */
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM_UNIFORM
|
||||
__dso_public uint32_t sudo_arc4random_uniform(uint32_t upper_bound);
|
||||
sudo_dso_public uint32_t sudo_arc4random_uniform(uint32_t upper_bound);
|
||||
# undef arc4random_uniform
|
||||
# define arc4random_uniform(_a) sudo_arc4random_uniform((_a))
|
||||
#endif /* ARC4RANDOM_UNIFORM */
|
||||
|
@@ -178,75 +178,75 @@
|
||||
#endif
|
||||
|
||||
/* aix.c */
|
||||
__dso_public int aix_getauthregistry_v1(char *user, char *saved_registry);
|
||||
sudo_dso_public int aix_getauthregistry_v1(char *user, char *saved_registry);
|
||||
#define aix_getauthregistry(_a, _b) aix_getauthregistry_v1((_a), (_b))
|
||||
__dso_public int aix_prep_user_v1(char *user, const char *tty);
|
||||
sudo_dso_public int aix_prep_user_v1(char *user, const char *tty);
|
||||
#define aix_prep_user(_a, _b) aix_prep_user_v1((_a), (_b))
|
||||
__dso_public int aix_restoreauthdb_v1(void);
|
||||
sudo_dso_public int aix_restoreauthdb_v1(void);
|
||||
#define aix_restoreauthdb() aix_restoreauthdb_v1()
|
||||
__dso_public int aix_setauthdb_v1(char *user);
|
||||
__dso_public int aix_setauthdb_v2(char *user, char *registry);
|
||||
sudo_dso_public int aix_setauthdb_v1(char *user);
|
||||
sudo_dso_public int aix_setauthdb_v2(char *user, char *registry);
|
||||
#define aix_setauthdb(_a, _b) aix_setauthdb_v2((_a), (_b))
|
||||
|
||||
/* gethostname.c */
|
||||
__dso_public char *sudo_gethostname_v1(void);
|
||||
sudo_dso_public char *sudo_gethostname_v1(void);
|
||||
#define sudo_gethostname() sudo_gethostname_v1()
|
||||
|
||||
/* gettime.c */
|
||||
__dso_public int sudo_gettime_awake_v1(struct timespec *ts);
|
||||
sudo_dso_public int sudo_gettime_awake_v1(struct timespec *ts);
|
||||
#define sudo_gettime_awake(_a) sudo_gettime_awake_v1((_a))
|
||||
__dso_public int sudo_gettime_mono_v1(struct timespec *ts);
|
||||
sudo_dso_public int sudo_gettime_mono_v1(struct timespec *ts);
|
||||
#define sudo_gettime_mono(_a) sudo_gettime_mono_v1((_a))
|
||||
__dso_public int sudo_gettime_real_v1(struct timespec *ts);
|
||||
sudo_dso_public int sudo_gettime_real_v1(struct timespec *ts);
|
||||
#define sudo_gettime_real(_a) sudo_gettime_real_v1((_a))
|
||||
|
||||
/* gidlist.c */
|
||||
__dso_public int sudo_parse_gids_v1(const char *gidstr, const gid_t *basegid, GETGROUPS_T **gidsp);
|
||||
sudo_dso_public int sudo_parse_gids_v1(const char *gidstr, const gid_t *basegid, GETGROUPS_T **gidsp);
|
||||
#define sudo_parse_gids(_a, _b, _c) sudo_parse_gids_v1((_a), (_b), (_c))
|
||||
|
||||
/* getgrouplist.c */
|
||||
__dso_public int sudo_getgrouplist2_v1(const char *name, gid_t basegid, GETGROUPS_T **groupsp, int *ngroupsp);
|
||||
sudo_dso_public int sudo_getgrouplist2_v1(const char *name, gid_t basegid, GETGROUPS_T **groupsp, int *ngroupsp);
|
||||
#define sudo_getgrouplist2(_a, _b, _c, _d) sudo_getgrouplist2_v1((_a), (_b), (_c), (_d))
|
||||
|
||||
/* key_val.c */
|
||||
__dso_public char *sudo_new_key_val_v1(const char *key, const char *value);
|
||||
sudo_dso_public char *sudo_new_key_val_v1(const char *key, const char *value);
|
||||
#define sudo_new_key_val(_a, _b) sudo_new_key_val_v1((_a), (_b))
|
||||
|
||||
/* locking.c */
|
||||
#define SUDO_LOCK 1 /* lock a file */
|
||||
#define SUDO_TLOCK 2 /* test & lock a file (non-blocking) */
|
||||
#define SUDO_UNLOCK 4 /* unlock a file */
|
||||
__dso_public bool sudo_lock_file_v1(int fd, int action);
|
||||
sudo_dso_public bool sudo_lock_file_v1(int fd, int action);
|
||||
#define sudo_lock_file(_a, _b) sudo_lock_file_v1((_a), (_b))
|
||||
__dso_public bool sudo_lock_region_v1(int fd, int action, off_t len);
|
||||
sudo_dso_public bool sudo_lock_region_v1(int fd, int action, off_t len);
|
||||
#define sudo_lock_region(_a, _b, _c) sudo_lock_region_v1((_a), (_b), (_c))
|
||||
|
||||
/* logfac.c */
|
||||
__dso_public bool sudo_str2logfac_v1(const char *str, int *logfac);
|
||||
sudo_dso_public bool sudo_str2logfac_v1(const char *str, int *logfac);
|
||||
#define sudo_str2logfac(_a, _b) sudo_str2logfac_v1((_a), (_b))
|
||||
__dso_public const char *sudo_logfac2str_v1(int num);
|
||||
sudo_dso_public const char *sudo_logfac2str_v1(int num);
|
||||
#define sudo_logfac2str(_a) sudo_logfac2str_v1((_a))
|
||||
|
||||
/* logpri.c */
|
||||
__dso_public bool sudo_str2logpri_v1(const char *str, int *logpri);
|
||||
sudo_dso_public bool sudo_str2logpri_v1(const char *str, int *logpri);
|
||||
#define sudo_str2logpri(_a, _b) sudo_str2logpri_v1((_a), (_b))
|
||||
__dso_public const char *sudo_logpri2str_v1(int num);
|
||||
sudo_dso_public const char *sudo_logpri2str_v1(int num);
|
||||
#define sudo_logpri2str(_a) sudo_logpri2str_v1((_a))
|
||||
|
||||
/* mkdir_parents.c */
|
||||
__dso_public bool sudo_mkdir_parents_v1(char *path, uid_t uid, gid_t gid, mode_t mode, bool quiet);
|
||||
sudo_dso_public bool sudo_mkdir_parents_v1(char *path, uid_t uid, gid_t gid, mode_t mode, bool quiet);
|
||||
#define sudo_mkdir_parents(_a, _b, _c, _d, _e) sudo_mkdir_parents_v1((_a), (_b), (_c), (_d), (_e))
|
||||
|
||||
/* parseln.c */
|
||||
__dso_public ssize_t sudo_parseln_v1(char **buf, size_t *bufsize, unsigned int *lineno, FILE *fp);
|
||||
__dso_public ssize_t sudo_parseln_v2(char **buf, size_t *bufsize, unsigned int *lineno, FILE *fp, int flags);
|
||||
sudo_dso_public ssize_t sudo_parseln_v1(char **buf, size_t *bufsize, unsigned int *lineno, FILE *fp);
|
||||
sudo_dso_public ssize_t sudo_parseln_v2(char **buf, size_t *bufsize, unsigned int *lineno, FILE *fp, int flags);
|
||||
#define sudo_parseln(_a, _b, _c, _d, _e) sudo_parseln_v2((_a), (_b), (_c), (_d), (_e))
|
||||
|
||||
/* progname.c */
|
||||
__dso_public void initprogname(const char *);
|
||||
sudo_dso_public void initprogname(const char *);
|
||||
|
||||
/* roundup.c */
|
||||
__dso_public unsigned int sudo_pow2_roundup_v1(unsigned int len);
|
||||
sudo_dso_public unsigned int sudo_pow2_roundup_v1(unsigned int len);
|
||||
#define sudo_pow2_roundup(_a) sudo_pow2_roundup_v1((_a))
|
||||
|
||||
/* secure_path.c */
|
||||
@@ -257,65 +257,65 @@ __dso_public unsigned int sudo_pow2_roundup_v1(unsigned int len);
|
||||
#define SUDO_PATH_WORLD_WRITABLE -4
|
||||
#define SUDO_PATH_GROUP_WRITABLE -5
|
||||
struct stat;
|
||||
__dso_public int sudo_secure_dir_v1(const char *path, uid_t uid, gid_t gid, struct stat *sbp);
|
||||
sudo_dso_public int sudo_secure_dir_v1(const char *path, uid_t uid, gid_t gid, struct stat *sbp);
|
||||
#define sudo_secure_dir(_a, _b, _c, _d) sudo_secure_dir_v1((_a), (_b), (_c), (_d))
|
||||
__dso_public int sudo_secure_file_v1(const char *path, uid_t uid, gid_t gid, struct stat *sbp);
|
||||
sudo_dso_public int sudo_secure_file_v1(const char *path, uid_t uid, gid_t gid, struct stat *sbp);
|
||||
#define sudo_secure_file(_a, _b, _c, _d) sudo_secure_file_v1((_a), (_b), (_c), (_d))
|
||||
|
||||
/* setgroups.c */
|
||||
__dso_public int sudo_setgroups_v1(int ngids, const GETGROUPS_T *gids);
|
||||
sudo_dso_public int sudo_setgroups_v1(int ngids, const GETGROUPS_T *gids);
|
||||
#define sudo_setgroups(_a, _b) sudo_setgroups_v1((_a), (_b))
|
||||
|
||||
/* strsplit.c */
|
||||
__dso_public const char *sudo_strsplit_v1(const char *str, const char *endstr, const char *sep, const char **last);
|
||||
sudo_dso_public const char *sudo_strsplit_v1(const char *str, const char *endstr, const char *sep, const char **last);
|
||||
#define sudo_strsplit(_a, _b, _c, _d) sudo_strsplit_v1(_a, _b, _c, _d)
|
||||
|
||||
/* strtobool.c */
|
||||
__dso_public int sudo_strtobool_v1(const char *str);
|
||||
sudo_dso_public int sudo_strtobool_v1(const char *str);
|
||||
#define sudo_strtobool(_a) sudo_strtobool_v1((_a))
|
||||
|
||||
/* strtonum.c */
|
||||
/* Not versioned for historical reasons. */
|
||||
__dso_public long long sudo_strtonum(const char *, long long, long long, const char **);
|
||||
sudo_dso_public long long sudo_strtonum(const char *, long long, long long, const char **);
|
||||
|
||||
/* strtoid.c */
|
||||
__dso_public id_t sudo_strtoid_v1(const char *str, const char *sep, char **endp, const char **errstr);
|
||||
__dso_public id_t sudo_strtoid_v2(const char *str, const char **errstr);
|
||||
sudo_dso_public id_t sudo_strtoid_v1(const char *str, const char *sep, char **endp, const char **errstr);
|
||||
sudo_dso_public id_t sudo_strtoid_v2(const char *str, const char **errstr);
|
||||
#define sudo_strtoid(_a, _b) sudo_strtoid_v2((_a), (_b))
|
||||
__dso_public id_t sudo_strtoidx_v1(const char *str, const char *sep, char **endp, const char **errstr);
|
||||
sudo_dso_public id_t sudo_strtoidx_v1(const char *str, const char *sep, char **endp, const char **errstr);
|
||||
#define sudo_strtoidx(_a, _b, _c, _d) sudo_strtoidx_v1((_a), (_b), (_c), (_d))
|
||||
|
||||
/* strtomode.c */
|
||||
__dso_public int sudo_strtomode_v1(const char *cp, const char **errstr);
|
||||
sudo_dso_public int sudo_strtomode_v1(const char *cp, const char **errstr);
|
||||
#define sudo_strtomode(_a, _b) sudo_strtomode_v1((_a), (_b))
|
||||
|
||||
/* sudo_printf.c */
|
||||
extern int (*sudo_printf)(int msg_type, const char *fmt, ...);
|
||||
|
||||
/* term.c */
|
||||
__dso_public bool sudo_term_cbreak_v1(int fd);
|
||||
sudo_dso_public bool sudo_term_cbreak_v1(int fd);
|
||||
#define sudo_term_cbreak(_a) sudo_term_cbreak_v1((_a))
|
||||
__dso_public bool sudo_term_copy_v1(int src, int dst);
|
||||
sudo_dso_public bool sudo_term_copy_v1(int src, int dst);
|
||||
#define sudo_term_copy(_a, _b) sudo_term_copy_v1((_a), (_b))
|
||||
__dso_public bool sudo_term_noecho_v1(int fd);
|
||||
sudo_dso_public bool sudo_term_noecho_v1(int fd);
|
||||
#define sudo_term_noecho(_a) sudo_term_noecho_v1((_a))
|
||||
__dso_public bool sudo_term_raw_v1(int fd, int isig);
|
||||
sudo_dso_public bool sudo_term_raw_v1(int fd, int isig);
|
||||
#define sudo_term_raw(_a, _b) sudo_term_raw_v1((_a), (_b))
|
||||
__dso_public bool sudo_term_restore_v1(int fd, bool flush);
|
||||
sudo_dso_public bool sudo_term_restore_v1(int fd, bool flush);
|
||||
#define sudo_term_restore(_a, _b) sudo_term_restore_v1((_a), (_b))
|
||||
|
||||
/* ttyname_dev.c */
|
||||
__dso_public char *sudo_ttyname_dev_v1(dev_t tdev, char *name, size_t namelen);
|
||||
sudo_dso_public char *sudo_ttyname_dev_v1(dev_t tdev, char *name, size_t namelen);
|
||||
#define sudo_ttyname_dev(_a, _b, _c) sudo_ttyname_dev_v1((_a), (_b), (_c))
|
||||
|
||||
/* ttysize.c */
|
||||
__dso_public void sudo_get_ttysize_v1(int *rowp, int *colp);
|
||||
sudo_dso_public void sudo_get_ttysize_v1(int *rowp, int *colp);
|
||||
#define sudo_get_ttysize(_a, _b) sudo_get_ttysize_v1((_a), (_b))
|
||||
|
||||
/* uuid.c */
|
||||
__dso_public void sudo_uuid_create_v1(unsigned char uuid_out[16]);
|
||||
sudo_dso_public void sudo_uuid_create_v1(unsigned char uuid_out[16]);
|
||||
#define sudo_uuid_create(_a) sudo_uuid_create_v1((_a))
|
||||
__dso_public char *sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz);
|
||||
sudo_dso_public char *sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz);
|
||||
#define sudo_uuid_to_string(_a, _b, _c) sudo_uuid_to_string_v1((_a), (_b), (_c))
|
||||
|
||||
#endif /* SUDO_UTIL_H */
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include "sudo_iolog.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that iolog_parse_host_port() works as expected.
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "iolog_json.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
bool
|
||||
json_print_object(struct json_container *json, struct json_object *object)
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_iolog.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static const char *test_paths[] = {
|
||||
"testdir/a/b/c/user", /* create new */
|
||||
|
@@ -42,7 +42,7 @@ static struct iolog_escape_data {
|
||||
char *command;
|
||||
} escape_data;
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_iolog.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static struct parse_delay_test {
|
||||
const char *input;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "sudo_compat.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "sudo_compat.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -19,7 +19,7 @@
|
||||
# include "compat/fnmatch.h"
|
||||
#endif
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that sudo_getdelim() works as expected.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that sudo_getgrouplist2() works as expected.
|
||||
|
@@ -29,7 +29,7 @@ struct gl_entry {
|
||||
};
|
||||
|
||||
int test_glob(struct gl_entry *);
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#define SUFFIX ".suff"
|
||||
#define SLEN (sizeof SUFFIX - 1)
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* verify that a path generated by mkdtemp() or mkstemp() looks like a
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that sudo_parse_gids() works as expected.
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include "sudo_compat.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that getprogname() returns the expected result.
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_fatal.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Note: we do not test SIGUNUSED as it may not appear in sys_sigabbrev[]
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that sudo_strsplit() works as expected.
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_fatal.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/* sudo_strtobool() tests */
|
||||
static struct strtobool_data {
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_fatal.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/* sudo_strtoidx() tests */
|
||||
static struct strtoidx_data {
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_fatal.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/* sudo_strtomode() tests */
|
||||
static struct strtomode_data {
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_fatal.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/* sudo_strtonum() tests */
|
||||
static struct strtonum_data {
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
static void sudo_conf_dump(void);
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Simple test driver for sudo_conf().
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include "sudo_compat.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Simple test driver for sudo_parseln().
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include "sudo_queue.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Note: HLTQ_ENTRY is intentionally in the middle of the struct
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Test that sudo_vsyslog() works as expected.
|
||||
|
@@ -90,9 +90,9 @@ static struct termios term, oterm;
|
||||
static int changed;
|
||||
|
||||
/* tgetpass() needs to know the erase and kill chars for cbreak mode. */
|
||||
__dso_public int sudo_term_eof;
|
||||
__dso_public int sudo_term_erase;
|
||||
__dso_public int sudo_term_kill;
|
||||
sudo_dso_public int sudo_term_eof;
|
||||
sudo_dso_public int sudo_term_erase;
|
||||
sudo_dso_public int sudo_term_kill;
|
||||
|
||||
static volatile sig_atomic_t got_sigttou;
|
||||
|
||||
|
@@ -1863,7 +1863,7 @@ static struct option long_opts[] = {
|
||||
{ NULL, no_argument, NULL, 0 },
|
||||
};
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -1661,7 +1661,7 @@ static struct option long_opts[] = {
|
||||
{ NULL, no_argument, NULL, 0 },
|
||||
};
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -683,7 +683,7 @@ audit_json_show_version(int verbose)
|
||||
debug_return_int(true);
|
||||
}
|
||||
|
||||
__dso_public struct audit_plugin audit_json = {
|
||||
sudo_dso_public struct audit_plugin audit_json = {
|
||||
SUDO_AUDIT_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
audit_json_open,
|
||||
|
@@ -120,7 +120,7 @@ sample_query(const char *user, const char *group, const struct passwd *pwd)
|
||||
return false;
|
||||
}
|
||||
|
||||
__dso_public struct sudoers_group_plugin group_plugin = {
|
||||
sudo_dso_public struct sudoers_group_plugin group_plugin = {
|
||||
GROUP_API_VERSION,
|
||||
sample_init,
|
||||
sample_cleanup,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "sudo_plugin.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* Simple driver to test sudoer group plugins.
|
||||
|
@@ -145,7 +145,7 @@ python_plugin_approval_show_version(struct ApprovalPluginContext *approval_ctx,
|
||||
CALLBACK_PYNAME(show_version), verbose, PY_APPROVAL_PLUGIN_VERSION, "approval"));
|
||||
}
|
||||
|
||||
__dso_public struct approval_plugin python_approval;
|
||||
sudo_dso_public struct approval_plugin python_approval;
|
||||
|
||||
// generate symbols for loading multiple approval plugins:
|
||||
#define APPROVAL_SYMBOL_NAME(symbol) symbol
|
||||
@@ -175,7 +175,7 @@ static struct approval_plugin *extra_approval_plugins[] = {
|
||||
&python_approval7
|
||||
};
|
||||
|
||||
__dso_public struct approval_plugin *
|
||||
sudo_dso_public struct approval_plugin *
|
||||
python_approval_clone(void)
|
||||
{
|
||||
static size_t counter = 0;
|
||||
|
@@ -233,7 +233,7 @@ python_plugin_audit_show_version(struct AuditPluginContext *audit_ctx, int verbo
|
||||
CALLBACK_PYNAME(show_version), verbose, PY_AUDIT_PLUGIN_VERSION, "audit"));
|
||||
}
|
||||
|
||||
__dso_public struct audit_plugin python_audit;
|
||||
sudo_dso_public struct audit_plugin python_audit;
|
||||
|
||||
// generate symbols for loading multiple audit plugins:
|
||||
#define AUDIT_SYMBOL_NAME(symbol) symbol
|
||||
@@ -263,7 +263,7 @@ static struct audit_plugin *extra_audit_plugins[] = {
|
||||
&python_audit7
|
||||
};
|
||||
|
||||
__dso_public struct audit_plugin *
|
||||
sudo_dso_public struct audit_plugin *
|
||||
python_audit_clone(void)
|
||||
{
|
||||
static size_t counter = 0;
|
||||
|
@@ -106,7 +106,7 @@ python_plugin_group_query(const char *user, const char *group, const struct pass
|
||||
debug_return_int(rc);
|
||||
}
|
||||
|
||||
__dso_public struct sudoers_group_plugin group_plugin = {
|
||||
sudo_dso_public struct sudoers_group_plugin group_plugin = {
|
||||
GROUP_API_VERSION,
|
||||
CALLBACK_CFUNC(init),
|
||||
CALLBACK_CFUNC(cleanup),
|
||||
|
@@ -230,7 +230,7 @@ python_plugin_io_log_suspend(struct IOPluginContext *io_ctx, int signo, const ch
|
||||
}
|
||||
|
||||
// generate symbols for loading multiple io plugins:
|
||||
__dso_public struct io_plugin python_io;
|
||||
sudo_dso_public struct io_plugin python_io;
|
||||
#define IO_SYMBOL_NAME(symbol) symbol
|
||||
#include "python_plugin_io_multi.inc"
|
||||
#define IO_SYMBOL_NAME(symbol) symbol##1
|
||||
@@ -258,7 +258,7 @@ static struct io_plugin *extra_io_plugins[] = {
|
||||
&python_io7
|
||||
};
|
||||
|
||||
__dso_public struct io_plugin *
|
||||
sudo_dso_public struct io_plugin *
|
||||
python_io_clone(void)
|
||||
{
|
||||
static size_t counter = 0;
|
||||
|
@@ -273,7 +273,7 @@ cleanup:
|
||||
debug_return_int(rc);
|
||||
}
|
||||
|
||||
__dso_public struct policy_plugin python_policy = {
|
||||
sudo_dso_public struct policy_plugin python_policy = {
|
||||
SUDO_POLICY_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
CALLBACK_CFUNC(open),
|
||||
|
@@ -459,7 +459,7 @@ io_log_output(const char *buf, unsigned int len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
__dso_public struct policy_plugin sample_policy = {
|
||||
sudo_dso_public struct policy_plugin sample_policy = {
|
||||
SUDO_POLICY_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
policy_open,
|
||||
@@ -478,7 +478,7 @@ __dso_public struct policy_plugin sample_policy = {
|
||||
* Note: This plugin does not differentiate between tty and pipe I/O.
|
||||
* It all gets logged to the same file.
|
||||
*/
|
||||
__dso_public struct io_plugin sample_io = {
|
||||
sudo_dso_public struct io_plugin sample_io = {
|
||||
SUDO_IO_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
io_open,
|
||||
|
@@ -159,7 +159,7 @@ sample_approval_show_version(int verbose)
|
||||
debug_return_int(true);
|
||||
}
|
||||
|
||||
__dso_public struct approval_plugin sample_approval = {
|
||||
sudo_dso_public struct approval_plugin sample_approval = {
|
||||
SUDO_APPROVAL_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
sample_approval_open,
|
||||
|
@@ -278,7 +278,7 @@ sudoers_audit_version(int verbose)
|
||||
debug_return_int(true);
|
||||
}
|
||||
|
||||
__dso_public struct audit_plugin sudoers_audit = {
|
||||
sudo_dso_public struct audit_plugin sudoers_audit = {
|
||||
SUDO_AUDIT_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
sudoers_audit_open,
|
||||
|
@@ -78,7 +78,7 @@ static struct option long_opts[] = {
|
||||
{ NULL, no_argument, NULL, '\0' },
|
||||
};
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
static void help(void) __attribute__((__noreturn__));
|
||||
static void usage(int);
|
||||
static bool convert_sudoers_sudoers(struct sudoers_parse_tree *parse_tree, const char *output_file, struct cvtsudoers_config *conf);
|
||||
|
@@ -73,7 +73,7 @@ static struct timespec last_time;
|
||||
static void sudoers_io_setops(void);
|
||||
|
||||
/* sudoers_io is declared at the end of this file. */
|
||||
extern __dso_public struct io_plugin sudoers_io;
|
||||
extern sudo_dso_public struct io_plugin sudoers_io;
|
||||
|
||||
/*
|
||||
* Sudoers callback for maxseq Defaults setting.
|
||||
@@ -1238,7 +1238,7 @@ sudoers_io_setops(void)
|
||||
debug_return;
|
||||
}
|
||||
|
||||
__dso_public struct io_plugin sudoers_io = {
|
||||
sudo_dso_public struct io_plugin sudoers_io = {
|
||||
SUDO_IO_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
sudoers_io_open,
|
||||
|
@@ -55,7 +55,7 @@ const char *path_ldap_conf = _PATH_LDAP_CONF;
|
||||
const char *path_ldap_secret = _PATH_LDAP_SECRET;
|
||||
static bool session_opened;
|
||||
|
||||
extern __dso_public struct policy_plugin sudoers_policy;
|
||||
extern sudo_dso_public struct policy_plugin sudoers_policy;
|
||||
|
||||
#ifdef HAVE_BSD_AUTH_H
|
||||
extern char *login_style;
|
||||
@@ -1109,7 +1109,7 @@ sudoers_policy_register_hooks(int version, int (*register_hook)(struct sudo_hook
|
||||
}
|
||||
}
|
||||
|
||||
__dso_public struct policy_plugin sudoers_policy = {
|
||||
sudo_dso_public struct policy_plugin sudoers_policy = {
|
||||
SUDO_POLICY_PLUGIN,
|
||||
SUDO_API_VERSION,
|
||||
sudoers_policy_open,
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_fatal.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "sudoers.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -39,7 +39,7 @@ struct passwd *list_pw;
|
||||
sudo_printf_t sudo_printf;
|
||||
sudo_conv_t sudo_conv;
|
||||
|
||||
__dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
sudo_dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
extern void writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen);
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include "sudoers.h"
|
||||
#include "interfaces.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static int
|
||||
check_addr(char *input)
|
||||
|
@@ -31,7 +31,7 @@
|
||||
extern size_t base64_decode(const char *str, unsigned char *dst, size_t dsize);
|
||||
extern size_t base64_encode(const unsigned char *in, size_t in_len, char *out, size_t out_len);
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static unsigned char bstring1[] = { 0xea, 0xb8, 0xa2, 0x71, 0xef, 0x67, 0xc1, 0xcd, 0x0d, 0xd9, 0xa6, 0xaa, 0xa8, 0x24, 0x77, 0x2a, 0xfc, 0x6f, 0x76, 0x37, 0x1b, 0xed, 0x9e, 0x1a, 0x90, 0x5f, 0xcf, 0xbc, 0x00 };
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "parse.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
#define NUM_TESTS 8
|
||||
static const char *test_strings[NUM_TESTS] = {
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include <gram.h>
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
/*
|
||||
* TODO: test realloc
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include "sudoers_debug.h"
|
||||
#include "parse.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
const struct gentime_test {
|
||||
char *gentime;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
int hexchar(const char *s);
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
struct hexchar_test {
|
||||
char hex[3];
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include "sudo_fatal.h"
|
||||
#include "check.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
#ifdef __linux__
|
||||
static int
|
||||
|
@@ -323,10 +323,10 @@ typedef struct cache_item * (*sudo_make_pwitem_t)(uid_t uid, const char *user);
|
||||
typedef struct cache_item * (*sudo_make_gritem_t)(gid_t gid, const char *group);
|
||||
typedef struct cache_item * (*sudo_make_gidlist_item_t)(const struct passwd *pw, char * const *gids, unsigned int type);
|
||||
typedef struct cache_item * (*sudo_make_grlist_item_t)(const struct passwd *pw, char * const *groups);
|
||||
__dso_public struct group *sudo_getgrgid(gid_t);
|
||||
__dso_public struct group *sudo_getgrnam(const char *);
|
||||
__dso_public void sudo_gr_addref(struct group *);
|
||||
__dso_public void sudo_gr_delref(struct group *);
|
||||
sudo_dso_public struct group *sudo_getgrgid(gid_t);
|
||||
sudo_dso_public struct group *sudo_getgrnam(const char *);
|
||||
sudo_dso_public void sudo_gr_addref(struct group *);
|
||||
sudo_dso_public void sudo_gr_delref(struct group *);
|
||||
bool user_in_group(const struct passwd *, const char *);
|
||||
struct group *sudo_fakegrnam(const char *);
|
||||
struct gid_list *sudo_get_gidlist(const struct passwd *pw, unsigned int type);
|
||||
|
@@ -197,7 +197,7 @@ static void setup_terminal(struct iolog_info *li, bool interactive, bool resize)
|
||||
isalnum((unsigned char)(s)[6]) && isalnum((unsigned char)(s)[7]) && \
|
||||
(s)[8] == '\0')
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -99,7 +99,7 @@ extern char *malloc_options;
|
||||
extern int sudoersdebug;
|
||||
#endif
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -48,7 +48,7 @@ union timestamp_entry_storage {
|
||||
struct timestamp_entry v2;
|
||||
};
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
static void usage(void) __attribute__((__noreturn__));
|
||||
static void dump_entry(struct timestamp_entry *entry, off_t pos);
|
||||
|
@@ -122,7 +122,7 @@ static struct option long_opts[] = {
|
||||
{ NULL, no_argument, NULL, '\0' },
|
||||
};
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
@@ -140,7 +140,7 @@ sysgroup_query(const char *user, const char *group, const struct passwd *pwd)
|
||||
return false;
|
||||
}
|
||||
|
||||
__dso_public struct sudoers_group_plugin group_plugin = {
|
||||
sudo_dso_public struct sudoers_group_plugin group_plugin = {
|
||||
GROUP_API_VERSION,
|
||||
sysgroup_init,
|
||||
sysgroup_cleanup,
|
||||
|
@@ -57,7 +57,7 @@ getenv_unhooked(const char *name)
|
||||
return val;
|
||||
}
|
||||
|
||||
__dso_public char *
|
||||
sudo_dso_public char *
|
||||
getenv(const char *name)
|
||||
{
|
||||
char *val = NULL;
|
||||
@@ -129,7 +129,7 @@ putenv_unhooked(PUTENV_CONST char *string)
|
||||
return rpl_putenv(string);
|
||||
}
|
||||
|
||||
__dso_public int
|
||||
sudo_dso_public int
|
||||
putenv(PUTENV_CONST char *string)
|
||||
{
|
||||
switch (process_hooks_putenv((char *)string)) {
|
||||
@@ -201,7 +201,7 @@ setenv_unhooked(const char *var, const char *val, int overwrite)
|
||||
return rpl_setenv(var, val, overwrite);
|
||||
}
|
||||
|
||||
__dso_public int
|
||||
sudo_dso_public int
|
||||
setenv(const char *var, const char *val, int overwrite)
|
||||
{
|
||||
switch (process_hooks_setenv(var, val, overwrite)) {
|
||||
@@ -266,9 +266,9 @@ unsetenv_unhooked(const char *var)
|
||||
}
|
||||
|
||||
#ifdef UNSETENV_VOID
|
||||
__dso_public void
|
||||
sudo_dso_public void
|
||||
#else
|
||||
__dso_public int
|
||||
sudo_dso_public int
|
||||
#endif
|
||||
unsetenv(const char *var)
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_exec.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
sudo_dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
|
||||
static bool
|
||||
report_status(int status, const char *what)
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include "sudo_util.h"
|
||||
#include "sudo_debug.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[]);
|
||||
sudo_dso_public int main(int argc, char *argv[]);
|
||||
|
||||
int sudo_debug_instance = SUDO_DEBUG_INSTANCE_INITIALIZER;
|
||||
extern char *get_process_ttyname(char *name, size_t namelen);
|
||||
|
@@ -48,7 +48,7 @@
|
||||
#include "sudo_plugin.h"
|
||||
#include "sudo_util.h"
|
||||
|
||||
__dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
sudo_dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
|
||||
static int sesh_sudoedit(int argc, char *argv[]);
|
||||
|
||||
|
@@ -143,7 +143,7 @@ static void approval_show_version(int verbose, struct sudo_settings *settings,
|
||||
char * const user_info[], int submit_optind, char * const submit_argv[],
|
||||
char * const submit_envp[]);
|
||||
|
||||
__dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
sudo_dso_public int main(int argc, char *argv[], char *envp[]);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[], char *envp[])
|
||||
|
@@ -88,31 +88,31 @@ typedef struct interpose_s {
|
||||
}
|
||||
|
||||
#define DUMMY1(fn, t1) \
|
||||
__dso_public int \
|
||||
sudo_dso_public int \
|
||||
FN_NAME(fn)(t1 a1) \
|
||||
DUMMY_BODY \
|
||||
INTERPOSE(fn)
|
||||
|
||||
#define DUMMY2(fn, t1, t2) \
|
||||
__dso_public int \
|
||||
sudo_dso_public int \
|
||||
FN_NAME(fn)(t1 a1, t2 a2) \
|
||||
DUMMY_BODY \
|
||||
INTERPOSE(fn)
|
||||
|
||||
#define DUMMY3(fn, t1, t2, t3) \
|
||||
__dso_public int \
|
||||
sudo_dso_public int \
|
||||
FN_NAME(fn)(t1 a1, t2 a2, t3 a3) \
|
||||
DUMMY_BODY \
|
||||
INTERPOSE(fn)
|
||||
|
||||
#define DUMMY6(fn, t1, t2, t3, t4, t5, t6) \
|
||||
__dso_public int \
|
||||
sudo_dso_public int \
|
||||
FN_NAME(fn)(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \
|
||||
DUMMY_BODY \
|
||||
INTERPOSE(fn)
|
||||
|
||||
#define DUMMY_VA(fn, t1, t2) \
|
||||
__dso_public int \
|
||||
sudo_dso_public int \
|
||||
FN_NAME(fn)(t1 a1, t2 a2, ...) \
|
||||
DUMMY_BODY \
|
||||
INTERPOSE(fn)
|
||||
@@ -159,7 +159,7 @@ DUMMY6(posix_spawnp, pid_t *, const char *, const posix_spawn_file_actions_t *,
|
||||
*/
|
||||
DUMMY1(system, const char *)
|
||||
|
||||
__dso_public FILE *
|
||||
sudo_dso_public FILE *
|
||||
FN_NAME(popen)(const char *c, const char *t)
|
||||
{
|
||||
errno = EACCES;
|
||||
@@ -174,7 +174,7 @@ INTERPOSE(popen)
|
||||
*/
|
||||
typedef int (*sudo_fn_wordexp_t)(const char *, wordexp_t *, int);
|
||||
|
||||
__dso_public int
|
||||
sudo_dso_public int
|
||||
FN_NAME(wordexp)(const char *words, wordexp_t *we, int flags)
|
||||
{
|
||||
#if defined(HAVE___INTERPOSE)
|
||||
|
Reference in New Issue
Block a user