Exploit databaseDownload repository ZIP
GH-0f908aa4c9b32df570995d13dec3ed3e
liveoverflow/pwnedit
Sources for CVE-2021-3156
85 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files61
liveoverflow/pwneditRevision 539986ff65db
- ↑..Parent directory
- .libs/
- regress/
- Makefile
- Makefile.in
- conversation.c
- conversation.o
- env_hooks.c
- env_hooks.o
- exec.c
- exec.o
- exec_common.c
- exec_common.o
- exec_monitor.c
- exec_monitor.o
- exec_nopty.c
- exec_nopty.o
- exec_pty.c
- exec_pty.o
- get_pty.c
- get_pty.o
- hooks.c
- hooks.o
- libsudo_noexec.la
- limits.c
- limits.o
- load_plugins.c
- load_plugins.o
- net_ifs.c
- net_ifs.o
- openbsd.c
- parse_args.c
- parse_args.o
- preload.c
- preserve_fds.c
- preserve_fds.o
- selinux.c
- sesh.c
- signal.c
- signal.o
- solaris.c
- sudo
- sudo.c
- sudo.h
- sudo.o
- sudo_edit.c
- sudo_edit.o
- sudo_exec.h
- sudo_noexec.c
- sudo_noexec.la
- sudo_noexec.lo
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
episode11/sudo-1.8.31p2/src/sudo_plugin_int.h
Text · 4,424 bytes/*
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2010-2014 Todd C. Miller <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef SUDO_PLUGIN_INT_H
#define SUDO_PLUGIN_INT_H
/*
* All plugin structures start with a type and a version.
*/
struct generic_plugin {
unsigned int type;
unsigned int version;
/* the rest depends on the type... */
};
typedef int (*sudo_conv_1_7_t)(int num_msgs,
const struct sudo_conv_message msgs[], struct sudo_conv_reply replies[]);
/*
* Backwards-compatible structures for API bumps.
*/
struct policy_plugin_1_0 {
unsigned int type;
unsigned int version;
int (*open)(unsigned int version, sudo_conv_1_7_t conversation,
sudo_printf_t sudo_printf, char * const settings[],
char * const user_info[], char * const user_env[]);
void (*close)(int exit_status, int error); /* wait status or error */
int (*show_version)(int verbose);
int (*check_policy)(int argc, char * const argv[],
char *env_add[], char **command_info[],
char **argv_out[], char **user_env_out[]);
int (*list)(int argc, char * const argv[], int verbose,
const char *list_user);
int (*validate)(void);
void (*invalidate)(int remove);
int (*init_session)(struct passwd *pwd);
};
struct io_plugin_1_0 {
unsigned int type;
unsigned int version;
int (*open)(unsigned int version, sudo_conv_1_7_t conversation,
sudo_printf_t sudo_printf, char * const settings[],
char * const user_info[], int argc, char * const argv[],
char * const user_env[]);
void (*close)(int exit_status, int error);
int (*show_version)(int verbose);
int (*log_ttyin)(const char *buf, unsigned int len);
int (*log_ttyout)(const char *buf, unsigned int len);
int (*log_stdin)(const char *buf, unsigned int len);
int (*log_stdout)(const char *buf, unsigned int len);
int (*log_stderr)(const char *buf, unsigned int len);
};
struct io_plugin_1_1 {
unsigned int type;
unsigned int version;
int (*open)(unsigned int version, sudo_conv_1_7_t conversation,
sudo_printf_t sudo_printf, char * const settings[],
char * const user_info[], char * const command_info[],
int argc, char * const argv[], char * const user_env[]);
void (*close)(int exit_status, int error); /* wait status or error */
int (*show_version)(int verbose);
int (*log_ttyin)(const char *buf, unsigned int len);
int (*log_ttyout)(const char *buf, unsigned int len);
int (*log_stdin)(const char *buf, unsigned int len);
int (*log_stdout)(const char *buf, unsigned int len);
int (*log_stderr)(const char *buf, unsigned int len);
};
/*
* Sudo plugin internals.
*/
struct plugin_container {
TAILQ_ENTRY(plugin_container) entries;
struct sudo_conf_debug_file_list *debug_files;
char *name;
char *path;
char **options;
void *handle;
int debug_instance;
union {
struct generic_plugin *generic;
struct policy_plugin *policy;
struct policy_plugin_1_0 *policy_1_0;
struct io_plugin *io;
struct io_plugin_1_0 *io_1_0;
struct io_plugin_1_1 *io_1_1;
} u;
};
TAILQ_HEAD(plugin_container_list, plugin_container);
extern struct plugin_container policy_plugin;
extern struct plugin_container_list io_plugins;
int sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
struct sudo_conv_reply replies[], struct sudo_conv_callback *callback);
int sudo_conversation_1_7(int num_msgs, const struct sudo_conv_message msgs[],
struct sudo_conv_reply replies[]);
int sudo_conversation_printf(int msg_type, const char *fmt, ...);
bool sudo_load_plugins(struct plugin_container *policy_plugin,
struct plugin_container_list *io_plugins);
#endif /* SUDO_PLUGIN_INT_H */