Discussion:
Security for DBC
(too old to reply)
LUIS
2004-07-16 06:12:03 UTC
Permalink
Is there a way to protect DBC to be accessed by an undesired user?
Is there some kind password for DBC access?

Beforehand, thank you very much.
--
Luis Garcia
MS Developer
Eric den Doop
2004-07-16 08:13:47 UTC
Permalink
Hello, LUIS!

Not very secure but you can use use database events in VFP7 and up to
display a logon dialog. But anybody with VFP can hack it. If you want real
security, you need a database server like SQL or Oracle.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
Michael Collins
2004-07-16 13:09:24 UTC
Permalink
Some people use network permissions to control who has access to Fox tables. You can put your data in a separate folder, then either control access to the whole folder, individual files, or both.

Mike C.
Post by LUIS
Is there a way to protect DBC to be accessed by an undesired user?
Is there some kind password for DBC access?
Beforehand, thank you very much.
Mark McCasland
2004-07-16 13:20:53 UTC
Permalink
You can secure it from those who do NOT have VFP installed, but it only
works for VFP 7 and above. That is by using the DBC Events. However,
those that still have access to the data via your application, will
still be able to access the actual files through other means.
Post by LUIS
Is there a way to protect DBC to be accessed by an undesired user?
Is there some kind password for DBC access?
Beforehand, thank you very much.
Olaf Doschke
2004-08-05 11:37:45 UTC
Permalink
Post by LUIS
Is there a way to protect DBC to be accessed by an undesired user?
Is there some kind password for DBC access?
As suggested you can restrict access to a data directory
with windows file system security.

This thought can be extended:

-Define a special User for data access
Give the needed directory permissions
only to this user (and perhaps an admin)

-Let your application "impersonate" this user,
so the application works as this user, although
no real user will need any directory permissions.

Needed API calls are LogonUser,
ImpersonateLoggedOnUser, WNetGetUser,
RevertToSelf and CloseHandle.

Your application needs to store Username and
password information for that data access user.
This is still a risk due to the decompilability of fox
code. But you have the encryption capabilities of
the windows API for that remaining problem: you
can store the user/password encrypted.

How it works is described in Detail in an article
from the "Loseblattsammmlung FoxX Professional"
from the german foxuser group (www.dfpug.de)

It's quite probable, that the original author can
help you on that subject and pass on the needed
code.

To prevent spamming, here's foxcode to show
his mailadress. You should be able to run it. If
you are in the decision phase about using foxpro
at all you could at least decode the mail adrees
with the freely available foxpro 9 public beta:

_cliptext =;
Strconv("YWxmLmJvcnJtYW5uQGFzY2ktY29uc3VsdGluZy5jb20",14)

Bye, Olaf.

Loading...