patchThe GNU Hurd - Patches: patch #1800, clean up some more crypt() things...


You are not allowed to post comments on this tracker with your current authentication level.

patch #1800: clean up some more crypt() things in idvec-verify.c

Submitted by:  Jeroen Dekkers <jeroen>
Submitted on:  Wed 06 Aug 2003 09:46:45 AM UTC  
Category:  libshouldbeinlibc Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  Marcus Brinkmann <marcus> Open/Closed:  Open
Planned Release:  None
Wiki-like text discussion box: 

Sat 09 Aug 2003 04:57:02 PM UTC, comment #5:

The crypt export restrictions have in fact been the reason that this provision for plaintext passwords were made.

However, today this is not an issue anymore. Either because of the relaxed export restrictions, or because crypt add ons for glibc exist outside the US. As you want it :)

The reason to return an error is if you accidentially link your password checking program not against -lcrypt, then you would get a wrong password message with the current code, instead seeing the error. Do you agree that this is better behaviour?

The missing root user is really a hack. I have my doubts about that one, too, but this is a different question.

Marcus Brinkmann <marcus>
Project AdministratorIn charge of this item.
Fri 08 Aug 2003 08:12:22 PM UTC, comment #4:

I have some serious doubt about this piece of code anyway. IMHO we shouldn't touch this unless we are really sure about the consequences. Is it for exmple possible that crypt isn't defined (or better returns ENOSYS) because of crypt import/export restrictions?

And I think it is better to have plain text passwords than nothing at all. Perhaps if crypt isn't available the password should be ignored and the used can login (or root can login...). See how other parts of libshouldbeinlibc deal with a missing root user in /etc/passwd.

Marco Gerards <marco_g>
Project Member
Fri 08 Aug 2003 06:55:24 PM UTC, comment #3:

I uploaded a new patch, this will return ENOTSUP when crypt is not available instead of using plain-text passwords. I tested it and it works fine.

Jeroen Dekkers <jeroen>
Wed 06 Aug 2003 10:13:18 PM UTC, comment #2:

I have reverted this change. Shame on you because you didn't test it (and shame on me for not testing it either, nor asking you if you did).

The pragma is necessary because not all programs linked to libshouldbeinlibc should also be linked to crypt.

The allowance for a missing crypt is not necessary anymore. But I reverted that change as well for now, because the code
would segfault otherwise if crypt happened not to be linked in by accident. A modified patch that disables plaintext passwords (which don't make much sense today anymore, I think), would be ok, assuming it is properly tested.

Marcus Brinkmann <marcus>
Project AdministratorIn charge of this item.
Wed 06 Aug 2003 11:07:44 AM UTC, comment #1:

Right. I have committed this change. Thanks!

Marcus Brinkmann <marcus>
Project AdministratorIn charge of this item.
Wed 06 Aug 2003 09:46:45 AM UTC, original submission:

We don't have to make crypt() weak nor check whether crypt() exist because it's always in glibc now.

Jeroen Dekkers <jeroen>


Attached Files
file #6012:  patch_item_1800.patch added by jeroen (1KiB - text/plain - patch item 1800)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-08-08 jeroen Patch CodeModified - New Version =>
2003-08-06 marcus patch_status_id2 =>
2003-08-06 marcus patch_status_id1 =>
    Assigned toNone => NA
    Closed on- => -

Back to the top

Powered by Savane 3.4