Amanda-Users

Re: exclude list optional not working?

2005-07-06 04:24:44
Subject: Re: exclude list optional not working?
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Jon LaBadie <jon AT jgcomp DOT com>, Amanda Users List <amanda-users AT amanda DOT org>
Date: Wed, 06 Jul 2005 10:06:07 +0200
Jon LaBadie wrote:
On Tue, Jul 05, 2005 at 11:14:19PM +0200, Paul Bijnens wrote:

Amanda will not complain
- if the exclude file on the client is not there at all
 In this case amanda can construct a gtar argument list that does
 not contain the exclude list of a non-existing file.
- or if the file is not readable: in that case amanda trusts the
 suid-root runtar executable so that gnutar can read the contents of
 the file, never mind the permissions.

But Amanda does need to verify if the file is there or not, otherwise
gnutar will complain about having handed a nonexisting file in the
argument list.


Paul,
I probably should look it up myself, but I'm feeling lazy.

Lazy, but you're correct!
I was too lazy to look it up in the source yesterday evening.
My mistake.



I thought that the various exclude features were generalized so that
amanda would make up its own exclude file from the various list and
appends.  In this way a dle could use a generic list from an exclude
file plus some other individual appends.

Yes it is like you say.  in amanda-2.4.5 sources,
client-src/client-util.c, lines 276-277 do the test, and
it only tests for ENOENT, not EPERM to suppress error msgs.
And the exclude list file building is done as user amanda, without suid
root at that time.

But even in that case, I believe this should flag an error, as implemented currently, otherwise the user would believe he created an
exclude file, while amanda silently ignores it because she cannot
read it.
In the case which started this, the EPERM is even in the directory
above, so that a dumb administrator (or me, 20 years ago too) would
change the permissions of the file to be world-readable, and even
then amanda could not access it.  Adding to the puzzle why the backups
don't fit on tape, and fiddling again with the compression settings
of the tape, changing the syntax in the exclude files from good to
bad again and flooding the mailinglist with problems about exclude
lists not working.



If I'm not all wet, then does amanda ever just pass on the name of
the user supplied file?

No, you're right completely, as usual.



--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
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, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************