Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] excluded/protected files

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Seth Alan Woolley <seth AT positivism.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] excluded/protected files
  • Date: Mon, 18 Oct 2004 23:38:08 -0700

On Mon, Oct 18, 2004 at 10:11:33PM -0700, Andrew wrote:
> Hi, I'd like to make a change to the /var/lib/sorcery/excluded and
> protected files. Right now they are the names of files and directories to
> ignore in certain parts of the file tracking and dispelling process. The
> limitation of these files is that wildcards are not allowed (even through
> excluded lists one, it doesn't work)
>
> Id like to change the files to contain regexps, one per line, that will
> be |'ed together inside the filter function. Its then up to the author
> whether or not to put a $ at the end (or not) which indicates if the
> entry is a file (or a directory). The pattern can of course contain
> .*'s and all that other regexp goodness.
>
> The advantage to this is that we can relatively efficiently solve
> bug 6423, which has been outstanding for a while. The submitted
> patch unfortunatly only allows glob patterns, which in-turn can require
> significant (and in many cases unacceptable) filesystem overhead. This
> also makes the filter function simpler and usually faster because it
> avoids (possibly slow) filesystem lookups of the current implementation.
> Timing the two versions side by side yields the new version slightly faster.
>
> The only non-developer impact with this is that there is a LOCAL_EXCLUDED
> file that allows users to exclude things on their own. Im not sure how
> widely used it is since its never been actively advertised. Also the
> only consequence is that more stuff will be excluded than usual
> since the regexps wont be anchored by ^ and $. That means silly short
> patterns like /media will match in other places, but I dont expect
> anyone not reading this email to be using that file or using really
> silly short patterns.

Since this change is entirely local to sorcery (meaning we don't need
the grimoire/sorcery backwards compatibility bugaboo), we should be able
to insert ^......$ in the excluded/protected files where they should be
needed at the same time the patch goes in to support this. I think we
should do this because it will avoid issues in the future.

I really like your proposed change, but I would like it better if we are
really accurate about what's in those excluded and protected files.

LOCAL_EXCLUDED shouldn't be needed; In fact, a grep of all grimoires
shows that LOCAL_EXCLUDED is in fact not used at all so people would
have to add files to /etc/sorcery/local/excluded manually to be
affected. I also checked for writes to /etc/sorcery/local/excluded
directly bypassing the global variable name for it, and still, nothing.

There's really no harm in keeping the LOCAL_EXCLUDED "feature"/"cruft",
is there? I'd say, do what you feel like, if you feel like removing
cruft, then we've been warned.

>
> This change will of course go into devel for a good long while, I want
> to do this early in the game to make sure its well tested.
>
> Comments/questions/ideas?
>
> -Andrew
>
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss
>

--
Seth Alan Woolley [seth at positivism.org], SPAM/UCE is unauthorized
Key id EF10E21A = 36AD 8A92 8499 8439 E6A8 3724 D437 AF5D EF10 E21A
http://smgl.positivism.org:11371/pks/lookup?op=get&search=0xEF10E21A
Security Team Leader Source Mage GNU/Linux http://www.sourcemage.org

Attachment: pgpug32RJuogO.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page