Fix crash when /oper operator badpass. Fix comment explaining the
authorMichael Poole <mdpoole@troilus.org>
Sat, 19 Mar 2005 22:52:33 +0000 (22:52 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 19 Mar 2005 22:52:33 +0000 (22:52 +0000)
crypted passwords.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1327 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
doc/example.conf
ircd/m_oper.c

index 96ecbbb896b8fb1ce82e49399cf8d9f429edf236..c404bdd4f6ab2bc9abfadafeb0e2bd60bafb44da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-03-19  Michael Poole <mdpoole@troilus.org>
+
+       * doc/example.conf (Operator): Correct the comment explaining
+       hashed passwords.
+
+       * ircd/m_oper.c (oper_password_match): Check correct variable to
+       determine whether the hashed password matched.
+
 2005-03-08  Michael Poole <mdpoole@troilus.org>
 
        * ircd/match.c (ipmask_parse): Explicitly zero-initialize the mask
index 8538096a88f5c63182795fb03ed281e147670564..92eedc72c68fc9ab2bdea0655f6649ca7c3c1d09 100644 (file)
@@ -609,9 +609,11 @@ CRULE
 #  # and the default setting.
 # };
 #
-# The encrypted password is optional.  If you wish to encrypt your
-# password, there is a utility in the ircd.  Please read the file
-# tools/README.
+# By default, the password is hashed using the system's native crypt()
+# function.  Other password mechanisms are available; the umkpasswd
+# utility from the ircd directory can hash passwords using those
+# mechanisms.
+#
 # All privileges are shown with their default values; if you wish to
 # override defaults, you should set only those privileges for the
 # operator.  Listing defaulted privileges just makes things harder to
index 3e561ebf32918dec8d68e76c35ce79f263a0757c..c820fe95907c2573194b3026fb903c7bb2e7d92b 100644 (file)
@@ -121,7 +121,7 @@ int oper_password_match(const char* to_match, const char* passwd)
      crypt_clear if it's enabled -- hikari */
   crypted = ircd_crypt(to_match, passwd);
 
-  if (to_match == NULL)
+  if (!crypted)
    return 0;
   res = strcmp(crypted, passwd);
   MyFree(crypted);