mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
In cb_fqdn() just return if the fqdn flag is set to false.
This commit is contained in:
@@ -1054,12 +1054,16 @@ resolve_host(const char *host, char **longp, char **shortp)
|
||||
* Sets user_host, user_shost, user_runhost and user_srunhost.
|
||||
*/
|
||||
static bool
|
||||
cb_fqdn(const union sudo_defs_val *unused)
|
||||
cb_fqdn(const union sudo_defs_val *sd_un)
|
||||
{
|
||||
bool remote;
|
||||
char *lhost, *shost;
|
||||
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. */
|
||||
remote = strcmp(user_runhost, user_host) != 0;
|
||||
|
||||
|
Reference in New Issue
Block a user