]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/radiusclient/patches/radiusd-1.16.accounting.diff
Add these files, used with TDB.
[ppp.git] / pppd / plugins / radius / radiusclient / patches / radiusd-1.16.accounting.diff
1 Message-ID: <19980211151522.51612@Galerkin.fs100.suse.de>
2 Date: Wed, 11 Feb 1998 15:15:22 +0100
3 From: Tilman Mueller-Gerbes <tmg@suse.de>
4 To: Lars Fenneberg <lf@elemental.net>
5 Subject: Re: Radiusclient-0.3-alpha
6
7 Hi!
8
9 Das mit der spec-Datei dauert noch ein bisschen, allerdings habe
10 ich einen Bug-Fix fuer den Radiusd, d.h. dein Problem mit
11 den Radius-Accounting-Requests geloest:
12
13 Es ist so, dass bei Radius-Accounting Requests im Response-MD5-Digest
14 der radiusd 1.16 schlicht und einfach das secret nicht mit
15 einrechnet. Das secret wird mehr oder weniger zufaellig gesetzt
16 (d.h. gar nicht erst initialisiert :(.
17
18 Ich habe einen Patch fuer den Radiusd 1.16.1 (unten angehaengt).
19
20 Der Radiusd Berechnet die Digests bei Accounting Requests nicht -
21 ob das so i.O. ist sei mal dahingestellt, andere Implementationen
22 werden es wohl auch nicht tun.
23
24
25 ****
26
27 --- src/Makefile
28 +++ src/Makefile        1998/02/11 14:09:51
29 @@ -14,7 +14,7 @@
30  # unixware: add -Dunixware to CFLAGS, use LIBS= -lucb -lnsl -lsocket
31  #
32  SRCDIR=.
33 -CFLAGS= -O -DNOSHADOW
34 +CFLAGS= -O -DFIX_ACCOUNTING_BUG
35  LDFLAGS=
36  CC=    cc
37  LIBS=
38 --- src/acct.c
39 +++ src/acct.c  1998/02/11 14:09:10
40 @@ -70,6 +70,31 @@
41         char            buffer[512];
42         VALUE_PAIR      *pair;
43         long            curtime;
44 +       char            pw_digest[16];
45 +       /*
46 +        * fix accounting bug: when receiving an accounting request
47 +        * the digest is not checked at all and a wrong
48 +        * reply digest is calculated, as authreq->secret is not
49 +        * initialized
50 +        * this fix should not break any existing code, as the
51 +        * reply digest was random anyway (and may be never checked
52 +        * by anyone) -tmg@suse.de-
53 +        */
54 +#if defined(FIX_ACCOUNTING_BUG)
55 +       /* Verify the client and Calculate the MD5 Password Digest */
56 +       if(calc_digest(pw_digest, authreq) != 0) {
57 +               char            msg[512];
58 +               /* We dont respond when this fails */
59 +               sprintf(msg, "Authenticate: from %s - Security Breach Accounting\n",
60 +                       ip_hostname(authreq->ipaddr));
61 +               msg[127] = '\0';
62 +               log_err(msg);
63 +               pairfree(authreq->request);
64 +               memset(authreq, 0, sizeof(AUTH_REQ));
65 +               free(authreq);
66 +               return;
67 +       }
68 +#endif
69  
70         strncpy(clientname, ip_hostname(authreq->ipaddr), 128);
71         clientname[127] = '\0';
72
73
74
75
76 -- 
77   Tilman Mueller-Gerbes, S.u.S.E. GmbH, Gebhardtstr. 2, 90762 Fuerth, Germany
78   Tel: +49-911-7405330,       Fax: +49-911-7417755,      Email: tmg@suse.de
79 +-------------------------------------------------------------------------+
80 | S.u.S.E. auf der CeBIT '98!  --  Besuchen Sie uns in Halle 5, Stand A61 |
81 +-------------------------------------------------------------------------+
82