mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 23:35:36 +00:00
added prototypes
This commit is contained in:
20
check.c
20
check.c
@@ -64,16 +64,22 @@ static char rcsid[] = "$Id$";
|
|||||||
#include <shadow.h>
|
#include <shadow.h>
|
||||||
#endif /* __svr4__ */
|
#endif /* __svr4__ */
|
||||||
|
|
||||||
extern char *getpass();
|
extern char *getpass __P((char *));
|
||||||
|
|
||||||
static int check_timestamp();
|
/*
|
||||||
static void check_passwd();
|
* Prototypes for local functions
|
||||||
static void update_timestamp();
|
*/
|
||||||
static void reminder();
|
static int check_timestamp __P((void));
|
||||||
|
static void check_passwd __P((void));
|
||||||
|
static void update_timestamp __P((void));
|
||||||
|
static void reminder __P((void));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Globals
|
||||||
|
*/
|
||||||
|
static int timedir_is_good;
|
||||||
static char *timestampfile_p;
|
static char *timestampfile_p;
|
||||||
|
|
||||||
static int timedir_is_good;
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
|
15
logging.c
15
logging.c
@@ -60,14 +60,19 @@ static char rcsid[] = "$Id$";
|
|||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include "sudo.h"
|
#include "sudo.h"
|
||||||
|
|
||||||
void log_error();
|
/*
|
||||||
void readchild();
|
* Prototypes for local functions
|
||||||
static void send_mail();
|
*/
|
||||||
static RETSIGTYPE reapchild();
|
static void send_mail __P((void));
|
||||||
static int appropriate();
|
static RETSIGTYPE reapchild __P((int));
|
||||||
|
static int appropriate __P((int));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Globals
|
||||||
|
*/
|
||||||
static char logline[MAXLOGLEN + 8];
|
static char logline[MAXLOGLEN + 8];
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
*
|
*
|
||||||
* log_error()
|
* log_error()
|
||||||
|
19
sudo.c
19
sudo.c
@@ -92,6 +92,14 @@ extern char *strdup();
|
|||||||
#endif /* STDC_HEADERS */
|
#endif /* STDC_HEADERS */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* local functions not visible outside sudo.c
|
||||||
|
*/
|
||||||
|
static void usage __P((void));
|
||||||
|
static void load_globals __P((void));
|
||||||
|
static void rmenv __P((char **, char *, int));
|
||||||
|
static void clean_env __P((char **));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Globals
|
* Globals
|
||||||
*/
|
*/
|
||||||
@@ -104,15 +112,6 @@ char cwd[MAXPATHLEN + 1];
|
|||||||
uid_t uid = -2;
|
uid_t uid = -2;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* local functions not visible outside sudo.c
|
|
||||||
*/
|
|
||||||
static void usage();
|
|
||||||
static void load_globals();
|
|
||||||
static void rmenv();
|
|
||||||
static void clean_env();
|
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
* main ()
|
* main ()
|
||||||
@@ -275,7 +274,7 @@ static void load_globals()
|
|||||||
* loading the host global variable from gethostname() & gethostbyname()
|
* loading the host global variable from gethostname() & gethostbyname()
|
||||||
*/
|
*/
|
||||||
if ((gethostname(host, MAXHOSTNAMELEN))) {
|
if ((gethostname(host, MAXHOSTNAMELEN))) {
|
||||||
strcpy(host, "amnesiac");
|
strcpy(host, "localhost");
|
||||||
log_error(GLOBAL_NO_HOSTNAME);
|
log_error(GLOBAL_NO_HOSTNAME);
|
||||||
inform_user(GLOBAL_NO_HOSTNAME);
|
inform_user(GLOBAL_NO_HOSTNAME);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user