2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-03 15:55:40 +00:00

In cb_fqdn() just return if the fqdn flag is set to false.

This commit is contained in:
Todd C. Miller
2016-07-19 14:52:33 -06:00
parent 7218dbe542
commit 08e369572e

View File

@@ -1054,12 +1054,16 @@ resolve_host(const char *host, char **longp, char **shortp)
* Sets user_host, user_shost, user_runhost and user_srunhost. * Sets user_host, user_shost, user_runhost and user_srunhost.
*/ */
static bool static bool
cb_fqdn(const union sudo_defs_val *unused) cb_fqdn(const union sudo_defs_val *sd_un)
{ {
bool remote; bool remote;
char *lhost, *shost; char *lhost, *shost;
debug_decl(cb_fqdn, SUDOERS_DEBUG_PLUGIN) debug_decl(cb_fqdn, SUDOERS_DEBUG_PLUGIN)
/* Nothing to do if fqdn flag is disabled. */
if (sd_un != NULL && !sd_un->flag)
debug_return_bool(true);
/* If the -h flag was given we need to resolve both host and runhost. */ /* If the -h flag was given we need to resolve both host and runhost. */
remote = strcmp(user_runhost, user_host) != 0; remote = strcmp(user_runhost, user_host) != 0;