Mailing List Archive



Back to the month index Back to the list index

Mario Sergio Fujikawa Ferreira (lioux@GNS.com.br)
Fri, 3 Jan 1997 15:10:26 -0200 (EDT)


From: Mario Sergio Fujikawa Ferreira <lioux@GNS.com.br>
Message-Id: <199701031710.PAA07645@srv1-bsb.GNS.com.br>
Subject: [mSQL] Strange Database Access Denied
Date: Fri, 3 Jan 1997 15:10:26 -0200 (EDT)

        I wrote a standalone application using the same functions to debug them.
        It ran smoothly with my userid. When tried against the radius server userid, it did not.
        Both users have write access to the database through the acl rules.
        I was wondering about the rfc931 option, yet I enabled the radius user ident lookups: nothing happened.
        I became so desesperated I end up trying a simple insert query. Voila, it worked with my userid and did not with the radius server one.
        My userid is a common one, no privileges, just as the radius server one.
        This is my version info:

Version Details :-

        msqladmin version 1.0.16
        mSQL connection Localhost via UNIX socket
        mSQL server version 1.0.16
        mSQL protocol version 6
        mSQL TCP socket 4333
        mSQL UNIX socket /tmp/msql.sock
        mSQL root user msql
        Host Architecture FreeBSD-2.1.6-RELEASE-i386

        I did this program based on a original idea of one of the list users. Here is the test source:

#ifndef __MSQL_RADIUS__
# define __MSQL_RADIUS__

#include <msql.h>
#include <stdio.h>

void save_msql_record (void);
void msql_error (void);

void save_msql_record () {

        char buffer [512];
        int msql_handle,dbh,sth;

        sprintf (buffer, "insert into log (datloglog,input_octets,output_octets,tempo) values ('19961231152031loomy',10,30,10)");

                msql_handle = msqlConnect ((char *) NULL);

                if (msql_handle == -1) {
                   msql_error ();
                   return;
                }

                dbh = msqlSelectDB (msql_handle, "extrato_online");

                if (dbh == -1) {
                   msql_error ();
                   return;
                }

                sth = msqlQuery (msql_handle, buffer);

                if (sth == -1) {
                   msql_error ();
                   return;
                }

                /* msqlFreeResult (sth); */

                msqlClose (msql_handle);

}

void msql_error (void) {

        fprintf (stderr,"MSQL Error: %s\n", msqlErrMsg);

}

main () {
        save_msql_record ();
}
#endif

        Any ideas?

        Thanks,
                Mario Ferreira.
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!