Re: how auth "local" works and is documented
Jean-Louis Martineau <[email protected]>
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <[email protected]> |
On 13/04/17 09:46 AM, Chapman Flack wrote: > On 04/13/2017 08:12 AM, Jean-Louis Martineau wrote: > >> amanda do a validation to be sure the hostname written in the disklist >> is the same server. >> We don't want amanda to backup localhost when the user is expecting to >> backup a remote host. > Understood. And it is a good idea to do that validation. But that is > not what the current code is doing. > > The current code is just trying to match exact spelling against > gethostname() or a couple of hardcoded alternatives. > > If the server's gethostname() returns foo.example.com and the disklist > refers to foo, auth "local" will say "foo: is not local". > > https://github.com/zmanda/amanda/blame/d78f4b1/common-src/local-security.c#L128 > > The admin will certainly know the machine is local and the message > is bogus, but will not know the reason for the bogus message without > reading the code, because amanda-auth(7) is silent on what is being > validated and how. > > If the admin, like my predecessor, doesn't have time to figure out > why auth "local" is giving a bogus error, and just changes it to > connect with "bsdtcp" to itself instead because that works, then > later on there is no possible correction without changing the spelling > of the host in the disklist, which then makes years of prior backups > hard to recover because of the old spelling retained in headers on > tapes. > > So, if the purpose of the validation is "to be sure the hostname > written in the disklist is the same server", then that is what > should be checked, which is what the pseudocode in my earlier message > will do. I wrote that the patch looks good because I agree with you. Jean-Louis This message is the property of CARBONITE, INC. and may contain confidential or privileged information. If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone. Instead, destroy it and notify me by reply e-mail