|
From: Markus H. <mar...@mh...> - 2005-09-18 16:18:01
|
Hi Christian,
Christian M. Stamgren writes:
> I don't get these problems or error on my development platform (Linu=
x Gentoo).
> That libdbi dumps core when a user have the wrong rights to connect =
is not the=20
> right thing obviously.
It is not yet clear to me whether the crash has something to do with
permissions. It could be a rather unrelated problem that is specific
to my platform or my setup. Remember that it does not crash for me on
Debian, although I may have the permissions wrong on both platforms.
=20
>=20
>=20
> > Once again, I can use the command-line client isql without any
> > problems. It is only through libdbi that I keep getting problems.
>=20
> Are you using isql as root=3F=20
> Then you have =FCber-access rights, and can connect and perfrom task=
on every=20
> database on this server.=20
>=20
No, I'm not running this as root. I use my regular user account. For
what it's worth, running test=5Fdbi as root does not help either.
>=20
> Its not the same thing as accessing the databases through the C API =
which uses=20
> the user you have supplied in your program.=20
> Have you setupped a user with the gsec program=3F=20
>=20
Initially I've only used gsec to equip the SYSDBA account with a new
password. I ran all tests using the SYSDBA user with that new
password. To exclude any problems specific to this account, I've also
created another account:
GSEC> display=20
user name uid gid full name
-----------------------------------------------------------------------=
-------------------
SYSDBA 0 0 =20
MARKUS 1000 1000 =20
The uid and gid match my system account. I've repeated all tests using
this account with the same results. I can create, access, and change
the libdbitest database using the isql tool, but not through libdbi.
As far as I understand the permission handling of Firebird, it makes a
difference whether I use a local connection or a TCP connection. I use
something like:
localhost:/home/markus/workspace/libdbi/firebird
as the path in the iSQL CONNECT command and
database directory=3F [.] /home/markus/workspace/libdbi/firebird
database hostname=3F [(blank for local socket if possible)] localhost
in test=5Fdbi. According to the docs this runs the server using its own=
account, not the users account. In my case, there is a firebird
user. I've added this user to my group and changed the permissions of
the above directory to group write access. This way the isql call
which initially creates the database under the firebird account is
allowed to do so. This actually results in a file created by
firebird:markus.
In order to exclude permission problems, I added a chmod call right
after the isql command to change the database file to write access for
all. test=5Fdbi still segfaults when trying to access the database.
>=20
> I have just tested the "make check" option and on my platform with a=
user with=20
> correct rights, libdbi can create tables. Both from "make check"'s =
test=20
> program and other applications written that uses libdbi.
>=20
> I will spend some time today trying to get the test program to run o=
n Linux=20
> and then it should run on freebsd as well.=20
>=20
Could you elaborate a little further on how you handle permissions=3F
Which user account and which permissions do you use=3F I may still miss=
a simple detail about the permission handling of firebird. I'm not
sure whether I really grasp how the UNIX file permissions and the SQL
permissions have to be set to allow me to connect.=20
regards,
Markus
--=20
Markus Hoenicka
mar...@ca...
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de
|