Include setjmp.h in sudoers.h

Move error_jmp into plugin_error.c
Rename sudoers_plugin_cleanup sudoers_cleanup
Make sudoers warning/error functions work when sudo_conv is NULL
This commit is contained in:
Todd C. Miller
2012-11-25 09:33:33 -05:00
parent 3b5f786994
commit 3e5bd8dc52
6 changed files with 70 additions and 46 deletions

View File

@@ -23,6 +23,7 @@
#define _SUDO_SUDOERS_H
#include <limits.h>
#include <setjmp.h>
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
@@ -352,7 +353,7 @@ char *fmt_string(const char *, const char *);
FILE *open_sudoers(const char *, bool, bool *);
int sudoers_policy_init(void *info, char * const envp[]);
int sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[], void *closure);
void sudoers_plugin_cleanup(int);
void sudoers_cleanup(int);
/* policy.c */
int sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group);
@@ -371,6 +372,9 @@ int group_plugin_query(const char *user, const char *group,
/* setgroups.c */
int sudo_setgroups(int ngids, const GETGROUPS_T *gids);
/* plugin_error.c */
extern sigjmp_buf error_jmp;
#ifndef _SUDO_MAIN
extern struct sudo_user sudo_user;
extern struct passwd *list_pw;