Ben Escoto bescoto@stanford.edu
Fri, 17 May 2002 21:34:11 -0700

Content-Type: text/plain; charset=us-ascii

>>>>> "DG" == dean gaudet <dean-list-rdiff-backup@arctic.org>
>>>>> wrote the following on Fri, 17 May 2002 17:47:46 -0700 (PDT)

  DG> studying an strace of rdiff-backup (without
  DG> --change-source-perms) i notice that it doesn't even attempt to
  DG> open the file:

This isn't the intended behavior.

  DG> the patch below is a hack ... i think it's preferable to try the
  DG> open()/opendir() and use the results of that to decide whether
  DG> to try --change-source-perms.  the hack in the patch just
  DG> assumes root can open()/opendir().  in my quest for better
  DG> security for the backup i'm going to be investigating non-root
  DG> users which can do read-only opens of everything... which is why
  DG> i think hard-coding root is a hack.

Yes, I agree, your patch is better than the current behavior but what
you describe is the right way.  Apparently on some systems root can't
do everything, and maybe it's possible to read everything without
being root?  At any rate the permissions could change in the meantime
so that case has to be dealt with properly.  Let me know if you figure
out how to run a process with root permissions for reading only...

Ben Escoto

Content-Type: application/pgp-signature

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Exmh version 2.5 01/15/2001