Mario Frasca writes:
>
> This is a multi-part message in MIME format.
> --------------1B0C37DB328118F3A7EAE23F
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hi everyone,
> I'm experimenting with password on Linuxino ... oops, I mean, ELKS!
>
> the main problem is that it didn't work.
>
> the first problem/fix is this:
> the linux-86/libc/getent/putpwent.c writes the entry swapping gid and
> uid. I'm using libc version 0.14.9, according to the Libc_version
> file. one may think that swapping twice corrects the problem, but this
> is not the case, since we will be changing the password to all members
> of the group.
I have put a patched version of this file in elkscmd. Once it is merged
into dev86, I will remove it.
>
> the second problem was a discrepancy in elkscmd/sys_utils, between
> passwd.c and login.c. login.c removes the trailing '\n' from the
> password, passwd.c doesn't do it. I don't know what is the reason for
> removing the '\n', but I assume there must be one, so I added the
> following lines to passwd.c
>
> while (pwd != NULL) {
> if (pwd->pw_uid == uid) {
> + int i = strlen(nbuf1);
> + if(nbuf1[i-1]=='\n')
> + nbuf1[i-1] = 0;
> pwd->pw_passwd = crypt(nbuf1, salt);
> }
>
> well, it now does work!
Okay, I have merged this change, with David's version of the string code.
>
> from elkscmd/file_utils I modified ls.c, it is not a minor patch as the
> above one, so I'm including the whole text here.
> it now does recursion and reverse order, as well as better output on
> long listings (no more skipped lines). moreover, the executable is a
> bit smaller than the previous version. you may paste switches together
> (-ld instead of -l -d) but switches still have to precede file
> arguments.
> there may be some weakness in low-memory situations, since I don't
> always check for NULL when allocating memory. any good willing person
> may add it, if needed.
This should really go in as ELKS is very likely to run out of memory. I
have put your new version into the package, so if anyone wants to do this
they can check it out.
>
> one more: in file_utils/mkdir.c the default permission for the directory
> is 666. this does not allow entering the directory. I changed it to
> 777, but maybe something less could be more appropriate. what is the
> role of umask(0)?
Done this too.
>
> and the last one for today, this on on the 'date.c' I contributed. the
> last element of the array moffset is 304, should be 334. quite obvious
> bug to be discovered on the first of december!
>
Now CVS is back I will merge in the latest version together with the above
fix.
Thanks for the contribution.
Al