Add exported libsudo_util functions to util.exp and mark in headers
using __dso_public.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#define FNM_LEADING_DIR (1 << 3) /* Only match the leading directory */
|
||||
#define FNM_CASEFOLD (1 << 4) /* Case insensitive matching */
|
||||
|
||||
int sudo_fnmatch(const char *pattern, const char *string, int flags);
|
||||
__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. */
|
||||
int sudo_getaddrinfo(const char *nodename, const char *servname,
|
||||
__dso_public int sudo_getaddrinfo(const char *nodename, const char *servname,
|
||||
const struct addrinfo *hints, struct addrinfo **res);
|
||||
void sudo_freeaddrinfo(struct addrinfo *ai);
|
||||
const char *sudo_gai_strerror(int ecode);
|
||||
__dso_public void sudo_freeaddrinfo(struct addrinfo *ai);
|
||||
__dso_public const char *sudo_gai_strerror(int ecode);
|
||||
|
||||
/* Map sudo_* to RFC 3493 names. */
|
||||
#undef getaddrinfo
|
||||
|
@@ -55,19 +55,19 @@ struct option {
|
||||
int val;
|
||||
};
|
||||
|
||||
int sudo_getopt_long(int, char * const *, const char *,
|
||||
__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))
|
||||
|
||||
int sudo_getopt_long_only(int, char * const *, const char *,
|
||||
__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
|
||||
int sudo_getopt(int, char * const [], const char *);
|
||||
__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_NOSYS (-4) /* Function not supported. */
|
||||
#define GLOB_ABEND GLOB_ABORTED
|
||||
|
||||
int sudo_glob(const char *, int, int (*)(const char *, int), glob_t *);
|
||||
void sudo_globfree(glob_t *);
|
||||
__dso_public int sudo_glob(const char *, int, int (*)(const char *, int), glob_t *);
|
||||
__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))
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
* Copyright (c) 2013-2014 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -47,28 +47,28 @@ typedef struct {
|
||||
uint8_t buffer[SHA512_BLOCK_LENGTH];
|
||||
} SHA2_CTX;
|
||||
|
||||
void SHA224Init(SHA2_CTX *ctx);
|
||||
void SHA224Pad(SHA2_CTX *ctx);
|
||||
void SHA224Transform(uint32_t state[8], const uint8_t buffer[SHA224_BLOCK_LENGTH]);
|
||||
void SHA224Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
void SHA224Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
__dso_public void SHA224Init(SHA2_CTX *ctx);
|
||||
__dso_public void SHA224Pad(SHA2_CTX *ctx);
|
||||
__dso_public void SHA224Transform(uint32_t state[8], const uint8_t buffer[SHA224_BLOCK_LENGTH]);
|
||||
__dso_public void SHA224Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void SHA224Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
void SHA256Init(SHA2_CTX *ctx);
|
||||
void SHA256Pad(SHA2_CTX *ctx);
|
||||
void SHA256Transform(uint32_t state[8], const uint8_t buffer[SHA256_BLOCK_LENGTH]);
|
||||
void SHA256Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
void SHA256Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
__dso_public void SHA256Init(SHA2_CTX *ctx);
|
||||
__dso_public void SHA256Pad(SHA2_CTX *ctx);
|
||||
__dso_public void SHA256Transform(uint32_t state[8], const uint8_t buffer[SHA256_BLOCK_LENGTH]);
|
||||
__dso_public void SHA256Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void SHA256Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
void SHA384Init(SHA2_CTX *ctx);
|
||||
void SHA384Pad(SHA2_CTX *ctx);
|
||||
void SHA384Transform(uint64_t state[8], const uint8_t buffer[SHA384_BLOCK_LENGTH]);
|
||||
void SHA384Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
void SHA384Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
__dso_public void SHA384Init(SHA2_CTX *ctx);
|
||||
__dso_public void SHA384Pad(SHA2_CTX *ctx);
|
||||
__dso_public void SHA384Transform(uint64_t state[8], const uint8_t buffer[SHA384_BLOCK_LENGTH]);
|
||||
__dso_public void SHA384Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void SHA384Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
void SHA512Init(SHA2_CTX *ctx);
|
||||
void SHA512Pad(SHA2_CTX *ctx);
|
||||
void SHA512Transform(uint64_t state[8], const uint8_t buffer[SHA512_BLOCK_LENGTH]);
|
||||
void SHA512Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
void SHA512Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
__dso_public void SHA512Init(SHA2_CTX *ctx);
|
||||
__dso_public void SHA512Pad(SHA2_CTX *ctx);
|
||||
__dso_public void SHA512Transform(uint64_t state[8], const uint8_t buffer[SHA512_BLOCK_LENGTH]);
|
||||
__dso_public void SHA512Update(SHA2_CTX *ctx, const uint8_t *data, size_t len);
|
||||
__dso_public void SHA512Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA2_CTX *ctx);
|
||||
|
||||
#endif /* _SUDOERS_SHA2_H */
|
||||
|
Reference in New Issue
Block a user