Print configure args with verbose version information.

This commit is contained in:
Todd C. Miller
2010-06-11 10:53:44 -04:00
parent 3516d7f0e3
commit a28a4764e6
4 changed files with 28 additions and 15 deletions

View File

@@ -76,6 +76,7 @@
#include "sudo.h"
#include "sudo_plugin.h"
#include "sudo_plugin_int.h"
#include <sudo_usage.h>
#ifdef USING_NONUNIX_GROUPS
# include "nonunix.h"
@@ -161,6 +162,8 @@ main(int argc, char *argv[], char *envp[])
switch (sudo_mode & MODE_MASK) {
case MODE_VERSION:
printf("Sudo version %s\n", PACKAGE_VERSION);
if (user_details.uid == ROOT_UID)
(void) printf("Configure args: %s\n", CONFIGURE_ARGS);
policy_plugin.u.policy->show_version(!user_details.uid);
tq_foreach_fwd(&io_plugins, plugin) {
ok = plugin->u.io->open(SUDO_API_VERSION, sudo_conversation,

View File

@@ -29,4 +29,9 @@
#define SUDO_USAGE4 " [-AbEHknPS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C fd] [-D level] @LOGINCAP_USAGE@[-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]"
#define SUDO_USAGE5 " -e [-AknS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C fd] [-D level] @LOGINCAP_USAGE@[-g groupname|#gid] [-p prompt] [-u user name|#uid] file ..."
/*
* Configure script arguments used to build sudo.
*/
#define CONFIGURE_ARGS "@CONFIGURE_ARGS@"
#endif /* _SUDO_USAGE_H */