Profile include support

Russ Allbery rra at stanford.edu
Mon Aug 23 18:20:42 EDT 2010


Greg Hudson <ghudson at MIT.EDU> writes:

> After looking at the profile code a bit, I think that's about a 3x
> expansion in scope.  The least invasive approach would be to create a
> new variant of profile_init() which takes a struct errinfo * argument,
> and then to revise a bunch of internal APIs so that it can be used by
> the bottom-level code which does the actual parsing.

> I'm still pondering whether I think my schedule can accomodate that
> amount of scope creep.

Ugh.  :/

> I think that would be fine, and I hadn't considered it; I had assumed
> globbing support was the only good way to avoid including .rpmsave and ~
> files.

> That approach is probably more code than using glob() (though, of
> course, much less code than implementing glob() on any hypothetical
> platforms which don't have it).  It does have the virtue of simplifying
> the error cases.

Feel free to look at and/or copy things from server/config.c in the remctl
distribution [1] for how I handle this for one project.  It's all fairly
obvious, but that will show you what enforcement I do on valid characters.

[1] http://git.eyrie.org/?p=kerberos/remctl.git;a=blob;f=server/config.c;h=5e249b84ade5362d9c342c6c2d8295b366f84465;hb=875965c76be4435304586770c9a27d2b102c3b12
    The last released version has some minor deficiencies in error
    handling.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the krbdev mailing list