Hiding database connection strings from xml file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Hiding database connection strings from xml file
# 1  
Old 03-12-2009
Hiding database connection strings from xml file

Hi ,
I have a configuration file with the following structure:
<CONFIG>
<DEFAULTS operator="oraread">
<PROPERTY name="hostname" value="myhostname"/>
<PROPERTY name="port" value="12343"/>
<PROPERTY name="dbname" value="dbname"/>
<PROPERTY name="connectstring" value="connectstring"/>
</DEFAULTS>
</CONFIG>

I read these parameters and pass hing to unix script that opens a sql connection based on the supplied parameters.
Now problem is that any user can read this file.
Is there a better way to hide these configuration parameters so that they can be acessed by specific programs(like setting them on the .profile)?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

System I database connection

Hi All. Does anybody here know the System I database? it's from IBM. because i don't know how to connect on the database using unix. How do i know what parameter will i use? Thanks, (2 Replies)
Discussion started by: znesotomayor
2 Replies

2. Shell Programming and Scripting

Extract strings from XML files and create a new XML

Hello everybody, I have a double mission with some XML files, which is pretty challenging for my actual beginner UNIX knowledge. I need to extract some strings from multiple XML files and create a new XML file with the searched strings.. The original XML files contain the source code for... (12 Replies)
Discussion started by: milano.churchil
12 Replies

3. Shell Programming and Scripting

Replace the .txt file between two strings in XML file

Hi i am having XML file with many number of lines,I need to replace between two strings with .txt file using awk. For ex <PersonInfoShipTo ------------------------------ /> My requirement is to replace the content between <PersonInfoShipTo ------------------------------ /> help me. Thanks... (9 Replies)
Discussion started by: Padmanabhan
9 Replies

4. Shell Programming and Scripting

Extract strings within XML file between different delimiters

Good afternoon! I have an XML file from which I want to extract only certain elements contained within each line. The problem is that the format of each line is not exactly the same (though similiar). For example, oa_var will be in each line, however, there may be no value or other... (3 Replies)
Discussion started by: bab@faa
3 Replies

5. Ubuntu

Database Connection

Hi, How to creating connection to mysql.I try to connect but the following error coming .How to solve it. Could not connect to New MySQL. Error creating SQL Model Connection connection to New MySQL. (Error: com.mysql.jdbc.Driver) com.mysql.jdbc.Driver Error creating JDBC Connection... (2 Replies)
Discussion started by: snallusami
2 Replies

6. Shell Programming and Scripting

Database connection string

Hi, I am touching shell scripting after a long gap of 3 years and forgotten almost all of it. So need help from everyone to revamp myself. To begin,please tell me what does this part of script do ( I have been asked to go thru a script and get a feel of it): #get database connection... (1 Reply)
Discussion started by: agarwal
1 Replies

7. Shell Programming and Scripting

Keep database connection opened!

Hello. I have to make a script with more than 1 SQL query and the problem is that i have to alternate from sql commands to unix commands. what i would like to know if it's posible(and how) to keep the databse connection opened till last sql command is ran and execute unix commands while the... (2 Replies)
Discussion started by: daniel1988
2 Replies

8. UNIX and Linux Applications

Connection time out from Database

Hi, Hi we have application running on Unix Server(solaris10), which establishes connection(sessions) with DATABASE(oracle 10g) which is on another server and firewal is there in between. After some time i am usually getting connection time out(oarcle error 3114/3113) in some of my... (0 Replies)
Discussion started by: ajaysahoo
0 Replies

9. Programming

database connection

i want to connect c++ to ms access. i am not clear about the concept of odbc please make me clear that for the above connection which version of odbc i will need? i am working on solaris so is there any kind like an odbc for windows and odbc for solaris? form where i can get the odbc... (0 Replies)
Discussion started by: ramneek
0 Replies

10. Programming

Database connection

Hi! I have very limited experience in UNIX, I have couple questions about database connection in C programs. I used to use pro*C to setup database connection to a remote Oracle server when I was in school about 2 yrs ago, is this method still in use in commercial C programs nowdays?... (2 Replies)
Discussion started by: whartoner
2 Replies
Login or Register to Ask a Question
GETPROTOENT(3)						     Linux Programmer's Manual						    GETPROTOENT(3)

NAME
getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent - get protocol entry SYNOPSIS
#include <netdb.h> struct protoent *getprotoent(void); struct protoent *getprotobyname(const char *name); struct protoent *getprotobynumber(int proto); void setprotoent(int stayopen); void endprotoent(void); DESCRIPTION
The getprotoent() function reads the next entry from the protocols database (see protocols(5)) and returns a protoent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary. The getprotobyname() function returns a protoent structure for the entry from the database that matches the protocol name name. A connec- tion is opened to the database if necessary. The getprotobynumber() function returns a protoent structure for the entry from the database that matches the protocol number number. A connection is opened to the database if necessary. The setprotoent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getproto*() functions. The endprotoent() function closes the connection to the database. The protoent structure is defined in <netdb.h> as follows: struct protoent { char *p_name; /* official protocol name */ char **p_aliases; /* alias list */ int p_proto; /* protocol number */ } The members of the protoent structure are: p_name The official name of the protocol. p_aliases A NULL-terminated list of alternative names for the protocol. p_proto The protocol number. RETURN VALUE
The getprotoent(), getprotobyname() and getprotobynumber() functions return a pointer to a statically allocated protoent structure, or a NULL pointer if an error occurs or the end of the file is reached. FILES
/etc/protocols protocol database file CONFORMING TO
4.3BSD, POSIX.1-2001. SEE ALSO
getnetent(3), getprotoent_r(3), getservent(3), protocols(5) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2008-08-19 GETPROTOENT(3)