Gene Heskett wrote:
On Wednesday 18 September 2002 08:01, marc.bigler AT day DOT com wrote:
Is it possible to add some comments in the .amandahosts file ? For
example:
# this is my comment bla bla bla bla
192.168.200.200 amandauser
Good Q Marc, all I can say is I don't have any in mine. You can add
a line, and run amcheck to see if it complains I suppose.
I just read through the source code (common-src/security.c, line 426
etc) , and it seems that the first two fields, separated by whitespace
are always interpreted as hostname and username. The rest of the line is
ignored. The file is read sequentially, until a match (simple
strcasecmp) is found, or until eof.
Empty lines and very long lines are handled fine (no buffer overflows).
So I suppose you could say:
# # this is my comment bla bla bla
# # some more comments
# # Just make sure the first two fields are not existent
192.168.200.200 amandauser # this part is ignored too
And never have some host named '#' (I believe that would be very
difficult to achieve?)
Bordercase: the second field is always the username, so next
line allows only the user named '#' to access the amandaserver,
probably not what you intended.
192.168.200.201 # WRONG! only the user named '#' is allowed!
192.168.200.201 # # even double hashes is wrong.
Well you could just as well have the comments in a file named README
in the amanda home directory. That makes it safer when the source
changes.
--
Paul Bijnens, Xplanation Tel +32 16 40.51.40
Interleuvenlaan 15 H, B-3001 Leuven, BELGIUM Fax +32 16 40.49.61
http://www.xplanation.com/ email: Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, *
* kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************
|