Fix isitme(), which is used to check if node-specific configuration
belongs to our node, and was returning false positive if the first part of a node name matches short hostname. Approved by: pjd (mentor)
This commit is contained in:
parent
2b4c44d1c2
commit
6ff3f50607
@ -92,8 +92,10 @@ isitme(const char *name)
|
||||
* Now check if it matches first part of the host name.
|
||||
*/
|
||||
pos = strchr(buf, '.');
|
||||
if (pos != NULL && pos != buf && strncmp(buf, name, pos - buf) == 0)
|
||||
if (pos != NULL && (size_t)(pos - buf) == strlen(name) &&
|
||||
strncmp(buf, name, pos - buf) == 0) {
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* At the end check if name is equal to our host's UUID.
|
||||
|
Loading…
x
Reference in New Issue
Block a user