help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnu-radius] Problem with builddbm.


From: Sergey Poznyakoff
Subject: Re: [Help-gnu-radius] Problem with builddbm.
Date: Mon, 15 Oct 2001 23:34:27 +0300

Boa dia, Saverio

> Oct 15 15:49:06: Info: /usr/local/etc/raddb/users reloaded.
> Oct 15 15:50:59: Error: can't open `/usr/local/etc/raddb/users': Not a
> directory

Yes, that's a bug that manifests itself only when compiled with old
DBM interface. To fix it, apply the following patch (change to
gnu-radius-0.95 directory and run patch -p0 < PATCHFILENAME):

--- radlib/orig/dbm.c   Mon Oct 15 23:05:55 2001
+++ radlib/dbm.c        Mon Oct 15 23:18:02 2001
@@ -96,14 +96,16 @@ create_dbm(name, dbmfile)
        int fd;
        char *p;
 
-       p = mkfilename(name, ".pag");
+       p = emalloc(strlen(name)+5);
+        strcat(strcpy(p, name), ".pag");
        fd = open(p, O_WRONLY | O_CREAT | O_TRUNC, 0600);
        efree(p);
        if (fd < 0) 
                return 1;
        close(fd);
 
-       p = mkfilename(name, ".dir");
+        p = emalloc(strlen(name)+5);
+        strcat(strcpy(p, name), ".dir");
        fd = open(p, O_WRONLY | O_CREAT | O_TRUNC, 0600);
        efree(p);
        if (fd < 0) 


Regards,
Sergey





reply via email to

[Prev in Thread] Current Thread [Next in Thread]