/[hurd]/hurd/libshouldbeinlibc/idvec-verify.c
ViewVC logotype

Diff of /hurd/libshouldbeinlibc/idvec-verify.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by marcus, Wed Aug 6 11:07:26 2003 UTC revision 1.11 by marcus, Wed Aug 6 22:10:28 2003 UTC
# Line 1  Line 1 
1  /* Verify user passwords  /* Verify user passwords
2    
3     Copyright (C) 1996,97,98,99,2002,2003 Free Software Foundation, Inc.     Copyright (C) 1996,97,98,99,2002 Free Software Foundation, Inc.
4     Written by Miles Bader <miles@gnu.org>     Written by Miles Bader <miles@gnu.org>
5    
6     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
# Line 30  Line 30 
30    
31  #define SHADOW_PASSWORD_STRING  "x" /* pw_passwd contents for shadow passwd */  #define SHADOW_PASSWORD_STRING  "x" /* pw_passwd contents for shadow passwd */
32    
33    #pragma weak crypt
34    
35  static error_t verify_id (); /* FWD */  static error_t verify_id (); /* FWD */
36    
37  /* Get a password from the user, returning it in malloced storage.  */  /* Get a password from the user, returning it in malloced storage.  */
# Line 68  verify_passwd (const char *password, Line 70  verify_passwd (const char *password,
70    if (sys_encrypted[0] == '\0')    if (sys_encrypted[0] == '\0')
71      return 0;                   /* No password.  */      return 0;                   /* No password.  */
72    
73    /* Encrypt the password entered by the user (SYS_ENCRYPTED is the salt). */    if (crypt)
74    encrypted = crypt (password, sys_encrypted);      /* Encrypt the password entered by the user (SYS_ENCRYPTED is the salt). */
75        encrypted = crypt (password, sys_encrypted);
76      else
77        /* No crypt on this system!  Use plain-text passwords.  */
78        encrypted = password;
79    
80    if (! encrypted)    if (! encrypted)
81      /* Crypt failed.  */      /* Crypt failed.  */
82      return errno;      return errno;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26