Fix complilation on systems with set_auth_parameters()

Sprinkle volatile to quiet warnings from gcc 2.8.0
This commit is contained in:
Todd C. Miller
2010-10-12 10:47:16 -04:00
parent e4abd86c6b
commit 93d2420de9
2 changed files with 20 additions and 20 deletions

View File

@@ -76,6 +76,15 @@
#ifdef HAVE_SETAUTHDB
# include <usersec.h>
#endif /* HAVE_SETAUTHDB */
#if defined(HAVE_GETPRPWNAM) && defined(HAVE_SET_AUTH_PARAMETERS)
# ifdef __hpux
# undef MAXINT
# include <hpsecurity.h>
# else
# include <sys/security.h>
# endif /* __hpux */
# include <prot.h>
#endif /* HAVE_GETPRPWNAM && HAVE_SET_AUTH_PARAMETERS */
#include "sudo.h"
#include "sudo_plugin.h"
@@ -131,6 +140,14 @@ main(int argc, char *argv[], char *envp[])
setprogname(argv[0]);
#endif
/* Must be done before we do any password lookups */
#if defined(HAVE_GETPRPWNAM) && defined(HAVE_SET_AUTH_PARAMETERS)
(void) set_auth_parameters(argc, argv);
# ifdef HAVE_INITPRIVS
initprivs();
# endif
#endif /* HAVE_GETPRPWNAM && HAVE_SET_AUTH_PARAMETERS */
if (geteuid() != 0)
errorx(1, "must be setuid root");