October 4th, 2000

Yay for keen.com!

I didn't knew this site until I saw the link on Melanie's site (meltv.com).

So, I've just spoke with here on the phone.
Nothing special, more to say just hello!

But it is funny, though, how these things are possible and the changes that this all make in the lives of the people who use it....
You see, we are thousands of kilometers apart; she is in New York, I'm in Lisbon. Se is in the United States and I'm in Portugal, in Europe.
Yet, it didn't seemed so far away....

I'm going to rest now for a while.
I'm really tired; this cold has really got me totally tired and exhausted.
To a point that today, after recovering what I had re-done because of what I had lost on the power failure, I just erase it by accident by copying the file on the server over the one I had been working on and not the other way around!....

Nothing that a little rest won't help, I think....

So, see you all tomorrow!
  • Current Mood
    cheerful cheerful

get_user_name

Done and tested!
Working as expected and I'll never forget the fight it was to write it, not because it was to hard but because of outer circumstances.....

Anyway, (in case you havent noticed yet) I am already awake, with my body being command into spreading some more colds around me (which I try to avoid by covering my nose and mouth whenever a sneeze comes out!)... But I think the cold is getting its revenge when I get all this headache and this tiredness feeling....

Anyway, the cold will pass an I'll stay, I think....
  • Current Mood
    drained drained

exist_user?

I'm right now around the word exist_user? while listening to "The Bletherskate" by the Tannahill Weavers....

And not only this word as the necessary "lego pieces" as well.

In fist place, I must do a grep to the /etc/alias file to see if the user name already exists.
If nothing is returned then the name does not exist but if something is returned it might be that our "new user name" is either some that already exists (in which case it can't be accepted) or only a part of an already existing user name (in which case it can be accepted).
Both cases must be accounted for.

After the name has been validated, it can be used to build the new user's account and necessary data structures.

So, back to exist_user? right now...

Bag pipes

There is something in the bag pipes and in the fiddle sound that really makes me like it so much....

But I don't know exactly what it is. I only know that it really plays with me!

Columbus Egg!

That's really a Columbus Egg!

I've been thinking throughout this whole application that the methods that I'm using to get unprivileged users do things that only the root user should do is not good.
But so far, the only idea I had was to write a deamon that would be running as root and carried out the commands a unprivileged user would request.
And that by using a TCP network connection.

Right, that's a good idea.
In this case I don't have to care if the deamon is on the same server than where I'm running the WEB interface and that as a lot of positive points.
But for this application is an overkill and I would have to setup a number of security measures to insure that no one outside the allowed servers would be able to use it.

And then it stroke me.... Why not using a named_pipe?
They are buffers for inter process communication (IPC) and are there and available.
And, with them, there is no problem for access from another server as they only work inside a single computer.

So, I think, that is the answer!
It's not going to enter in this version I'm writing at the moment (it would require quite a lot of rewriting and I'm already to much delayed from the original schedule. But after this version is ready, I'll re-write it to use this.

Now, I'm going for a little test just to see if it all works as expected!
  • Current Mood
    ecstatic ecstatic

It works!!!!

It works!!!!

So, it's not for this one, but I know already how it will be done in the future!

First, using named_pipes, then, I'll go for sockets.
And each application will always have 2 parts:

The WEB interface itself (mainly a lot of CGIs and some logic to precess them and make calls in a intermediate API for the inside application code, running ALL time (not like with CGIs that only run for a short period of time, to produce the HTML they must generate) and, thus, able to retain state much more easily than with CGIs.

Oh boy! Just have realized this and how easily it can be implemented (compared with the way I'm doing right now) just make me fly high!

Well, back to the hard work!
  • Current Mood
    energetic energetic

named_pipes

The more I explore the idea more I like it!

And I can get a very grained control over which users are allowed to run the commands, by controlling the ownership and the permissions of the named pipe itself.
I can setup a named_pipe where everyone can send commands to, or I can set it's permissions so that only one user can send commands.
And on the other side of the pipe I can have a root process, that gets the commands and just executes them.

And although I hadn't that idea, I think that this night I'll go for it (in a simplified version) to make me run the commands to create a user, delete a user, so forth....

That will make the application much more robust...
  • Current Mood
    content content