diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-01-08 16:00:31 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-01-26 10:41:56 -0500 |
commit | 7baafe4f4151d0a62a32d2bd47bcb5de3d312e94 (patch) | |
tree | db281411ad6853c877f208203c0d55f5bb58491f /ipa-client/ipa-join.c | |
parent | 0b0cd7872fa87b4a12113eb14835a09af436ae33 (diff) | |
download | freeipa-7baafe4f4151d0a62a32d2bd47bcb5de3d312e94.tar.gz freeipa-7baafe4f4151d0a62a32d2bd47bcb5de3d312e94.tar.xz freeipa-7baafe4f4151d0a62a32d2bd47bcb5de3d312e94.zip |
Require that the hostname we are joining as is fully-qualified
Diffstat (limited to 'ipa-client/ipa-join.c')
-rw-r--r-- | ipa-client/ipa-join.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipa-client/ipa-join.c b/ipa-client/ipa-join.c index 0fef6fd79..7cc03157f 100644 --- a/ipa-client/ipa-join.c +++ b/ipa-client/ipa-join.c @@ -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 { |