On Fri, Jun 21, 2002 at 04:51:13PM -0500, guitarlynn wrote:
> On Thursday 20 June 2002 07:19, Jon Clausen wrote:
>
> > having the paths/filenames hardcoded into the C-executable might be a
> > way of minimizing the potential abuse of such a program(?)
>
> Definately!
I am in fact going with the alternative idea, of not even moving files.
But rather just let that little program "touch"/remove an empty file.
I'm thinking that, since there's no problem in getting my script to put
the file there, there's no *need* to have (suid)C move anything...
> Just copying over the old one from the /tmp file would save a few lines.
> I generally do this step with a "save" or "commit changes" option you
For sure there are a great deal more than one or two lines to strip, but
yeah you're right. It's a leftover from earlier.
> can also code it to do a backup of the package with this step.
I like that :) Wouldn't I be getting into the "same" kind of permissions
trouble though? I mean, lrpkg needs to be run by root... doesn't it?
> I would setup a seperate /tmp file for every web page, so when you
> only change one or two things, you don't need to regenerate the
> whole config again.
Which is basically what it's doing. At this time there *is* only one
page where you can set up times etc. But having used it for a (short)
while now, I'm realizing that more stuff needs to be setable from the
webinterface.
Like f.x. globallly: "The absolute number of steps from extreme to
extreme". But also I think there should be at least two or three
"preference positions", which in turn is going to demand a pretty major
rethink/rewrite of both the webinterface as well as underlying scripts,
*and* the conf file formats.
But the point is taken, and this will be the way to go :)
> As far as shell scripting this, the forms should
> send whatever option to the file you define, so leaving commented
> options in serves no point other than code-bloat unless your planning
> on hand-editing the config file(s).
Exactly. Hand-editing is not what I plan. And as such, it's a much
easier approach (from a programming pov) to simply steamroll a freshly
generated crontab over the old one.
> > Fourth, a table with a given delimiter (':' f.x.) is *way* easier to
> > both parse, *and* update.
>
> as opposed to space delimiting or line delimiting..... I dunno about
> that in a shell (depending on how you named you variables).
Well no, what I meant was; as opposed to having it all stored in the
crontab, and read/parse/modify/write...
> > This may be 'baby' programming, but it works. :)
>
> That is the point!
Yep ;)
> > Guess I'm going to have to learn a little C next ;D
>
> Sounds like fun! There is enough source code for Linux
> programs to learn how to code about anything! C isn't
> terribly difficult to learn if you can figure out with functions
> you want to use and what library they are in ;-)))
Heh... yeah, *that's* the only problem there... :D
BTW it occurred to me that I should maybe move this whole discussion
over to leaf-devel? I'm not subscribed yet, but I'm thinking that it
might be the more 'proper' place for all this?
cheers,
Jon Clausen
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html