Monday, November 21, 2005

Second attempt at nALFS + package users

Categories:

Last night I have run another build and found a few problems.

Sunday, November 20, 2005

First attempt at nALFS + package users

Categories:

I tried to modify the LFS-6.1-1 ALFS profile for implimenting the changes. I used 6.1 live cd and there are a few digest mismatches. Apparently there was a server hickup and things changed. I guess it's okay to ignore them. The rest of the errors and temporary work arounds are here.

patched nALFS to use /etc/passwd from $LFS

Categories:

The earlier patch for uid:gid failed because You can't use it to set additional groups which is required because package users use sticky bit of install dirs owned by install group.

So once more I found myself looking at nALFS code. This time I was looking at change group function in stage.c and discovered that it had been modified earlier for use in chroot environment. I knew it when I saw because I was hoping to use the fget.... functions too. Hmm, looks like the team has forgot to change the change_to_user function. I did it and here is the patch. It's working just fine.

nALFS-1.2.5-change_to_user.patch

Thursday, November 17, 2005

patched nALFS to use uid:gid style user info

Categories:

As I got no replies for my mail to alfs mailing list, I have finally decided to get my hands dirtier (They are already dirty). I have made a patch for nALFS that seems to do the job of using <user>uid:gid</user>. the usual at your own risk blah blah... disclaimer.

The format <user>uid:gid</user> has to be strictly followed and it won't check for the format, neither does it have any defaults in case you omit anything. I don't know if I have broken the original functionality. I had to bypass the user not found check and I didn't care to adopt it, instead I removed it. So I suggest either you look into it and modify it further or wait till my exams are over and I'll be more free to work them out.

There is one more catch, there are two files with same function which are exact replicas. But I changed only one that was being used when I traced it in gdb. Be warned, its only a couple of days since I started using gdb. Thanks to Kousik and Sunny.

nALFS-1.2.5-user-UID.patch

Wednesday, November 09, 2005

package users and nALFS: define package id in users tag

Categories:

The other option Iwas left with is to use use numeric uid in <users></users>. But can it take the syntax <users>uid:gid</users> because without gid, it is going to be a mess unless taken care of. or is it going to default to the uid value for gid too? I have to experiment and find out. unless some one can help me here.

Another thing I can do is (in case it won't take the gid) set the gid while cleaning up with something like find / -uid $UID -exec chgrp $GID {} and take extra care to set gid before making any suids.

Tuesday, November 08, 2005

Bug 1058 - changing user breaks when chrooted in script

Bug 1058 - changing user breaks when chrooted in script

I tried to make matching entries in /etc/passwd and /etc/groups on the host and still getting the user not found error.

Here are the contents I appended to the host contents.


/etc/passwd
/etc/group