mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -06:00
Require that the hostname we are joining as is fully-qualified
This commit is contained in:
parent
0b0cd7872f
commit
7baafe4f41
@ -541,6 +541,12 @@ join(const char *server, const char *hostname, const char *bindpw, const char *k
|
||||
hostname = strdup(uinfo.nodename);
|
||||
}
|
||||
|
||||
if (NULL == strstr(hostname, ".")) {
|
||||
fprintf(stderr, "The hostname must be fully-qualified: %s\n", hostname);
|
||||
rval = 16;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (bindpw)
|
||||
rval = join_ldap(ipaserver, hostname, &hostdn, bindpw, &princ, quiet);
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user