Hi,

I made a patch so that the external program called by an R:Line is supplied 
with the password as a fifth argument. Now I can move my millions of 
I:lines into a database :-) Feedback is very welcome, I'm currently writing 
a small programm to check against a mysql-db, maybe this would be of 
interest for some other users out there.

Tell me what u think

Nikolai Dahlem


-- SNIP -->
diff -urN orig/example.conf rwx/example.conf
--- orig/example.confThu Mar 14 23:16:06 2002
+++ rwx/example.confThu Mar 14 23:14:38 2002
@@ -518,6 +518,9 @@
  #
  R:csl.bu.edu:/home/hrose/bin.sun3/sun3access:*::
  #
+# The external program is called with five arguments
+# <programname> <username> <hostname> <ident> <password>
+# If no ident is found it's set to "unknown"
  #
  ############################
  # Q: [DISCOURAGED]. These lines "quarantine" specified servers.  Because
diff -urN orig/s_conf.c rwx/s_conf.c
--- orig/s_conf.cThu Mar 14 23:16:50 2002
+++ rwx/s_conf.cThu Mar 14 23:07:57 2002
@@ -1622,7 +1622,7 @@
  if (pi[1] != 2 && pi[1] != 1)
  (void)close(pi[1]);
  (void)execlp(tmp->passwd, tmp->passwd, name, host,
-     cptr->username, 0);
+     cptr->username, cptr->passwd, 0);
  _exit(-1);
      }
  default :
diff -urN orig/s_user.c rwx/s_user.c
--- orig/s_user.cThu Mar 14 23:17:08 2002
+++ rwx/s_user.cThu Mar 14 23:07:57 2002
@@ -545,7 +545,8 @@
  sendto_one(sptr, err_str(ERR_PASSWDMISMATCH, parv[0]));
  return exit_client(cptr, sptr, &me, "Bad Password");
      }
-bzero(sptr->passwd, sizeof(sptr->passwd));
+// bzero(sptr->passwd, sizeof(sptr->passwd));
+// moved down for checking passwd in R:Line
  /*
   * following block for the benefit of time-dependent K:-lines
   */
@@ -582,6 +583,7 @@
  return exit_client(cptr, sptr, &me , "R-lined");
      }
  #endif
+bzero(sptr->passwd, sizeof(sptr->passwd));
  if (oldstatus == STAT_MASTER && MyConnect(sptr))
  (void)m_oper(&me, sptr, 1, parv);
  /**user->tok = '1';
<-- SNIP --


Reply via email to