* "host" is the (possibly fully-qualified) hostname and
* "shost" is the unqualified form of the hostname.
*/
- sudo_user.host_fqdn_queried = FALSE;
nohostname = gethostname(thost, sizeof(thost));
if (nohostname)
user_host = user_shost = "localhost";
/* Defer call to set_fqdn() until log_error() is safe. */
user_shost = user_host;
} else {
- user_shost = user_host;
+ if ((p = strchr(user_host, '.'))) {
+ *p = '\0';
+ user_shost = estrdup(user_host);
+ *p = '.';
+ } else {
+ user_shost = user_host;
+ }
}
}
} else {
user_shost = user_host;
}
- sudo_user.host_fqdn_queried = TRUE;
}
/*