ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/tools/mkpasswd.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/tools/mkpasswd.c (file contents):
Revision 10207 by michael, Sun May 23 15:13:15 2021 UTC vs.
Revision 10208 by michael, Mon Jul 18 05:42:11 2022 UTC

# Line 151 | Line 151 | main(int argc, char *argv[])
151  
152    if (flag & FLAG_PASS)
153    {
154 <    if (!plaintext)
154 >    if (plaintext == NULL)
155 >    {
156        printf("Please enter a valid password\n");
157 +      exit(EXIT_FAILURE);
158 +    }
159 +  }
160 +  else if ((plaintext = getpass("plaintext: ")) == NULL)
161 +  {
162 +    printf("getpass() failed\n");
163 +    exit(EXIT_FAILURE);
164    }
157  else
158    plaintext = getpass("plaintext: ");
165  
166    if ((ret = crypt(plaintext, salt)))
167      printf("%s\n", ret);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines