dccifd segfaults with -p option

Vernon Schryver vjs@calcite.rhyolite.com
Thu Nov 6 03:41:41 UTC 2003


> From: Christopher Bodenstein <christopher.bodenstein@be.easynet.net>

> I recently upgraded my dccifd from 1.1.45 to 1.2.14
> Everything went smoothly, except that when I tried to start dccifd with
> the -p option to specify an alternate location than the dcc_homedir,
> dccifd segfaults.
>
> Did anyone already encountered that problem? Any ideas on how to fix it?

I suspect the cause is a stupid bug that predates 1.1.45.  The
code can't possibly work unless -p is the last arg given dccifd.
If -p is last, I bet it works fine.  This patch should fix it:

*** dccifd.c    Wed Oct 15 16:46:14 2003
--- new-dccifd.c        Wed Nov  5 20:35:05 2003
***************
*** 757,766 ****
        conn_family = AF_UNIX;
  
        if (conn_addr != conn_sun.sun_path) {
!               if (strlen(optarg) >= ISZ(conn_sun.sun_path))
                        dcc_logbad(EX_USAGE, "invalid UNIX domain socket: %s",
                                   conn_addr);
!               strcpy(conn_sun.sun_path, optarg);
        }
  #ifdef DCC_HAVE_SA_LEN
        conn_sun.sun_len = SUN_LEN(&conn_sun);
--- 757,766 ----
        conn_family = AF_UNIX;
  
        if (conn_addr != conn_sun.sun_path) {
!               if (strlen(conn_addr) >= ISZ(conn_sun.sun_path))
                        dcc_logbad(EX_USAGE, "invalid UNIX domain socket: %s",
                                   conn_addr);
!               strcpy(conn_sun.sun_path, conn_addr);
        }
  #ifdef DCC_HAVE_SA_LEN
        conn_sun.sun_len = SUN_LEN(&conn_sun);




Thanks for reporting the bug.  I'll include the fix in 1.2.15.

The main external changes in 1.2.15 involve allowing a few dozen large
(e.g. /16 or /8) CDIR blocks in the whiteclnt white list files and
making the per-user greylist log files optional.  The internal changes
are substantial and still unstable.


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.