Program security (When Launched)

Reply

Join Date: Mar 2005
Posts: 36
Reputation: Raven11 is an unknown quantity at this point 
Solved Threads: 1
Raven11 Raven11 is offline Offline
Light Poster

Program security (When Launched)

 
0
  #1
Mar 18th, 2005
I hope this makes sense... I made a program which requires authorization by username and password, once logged in it will allow you to load a program. My question is, is there a tutorial for the program being called to only open if it has been called by a certain program (Only a certain program can open it).

I was looking up google for tutorials and fstream, but I cannot find anything. Could someone please push me in the right direction?

Thanks in advance,
Rave
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,628
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 717
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Program security (When Launched)

 
0
  #2
Mar 18th, 2005
Off the top of my head I would say it's not easily possible unless you set up the calling program to run as a unique user. Then you could check to see what user owns your program's process (such as with ps) and terminate if it isn't the right one.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 19
Reputation: hostmoon is an unknown quantity at this point 
Solved Threads: 0
hostmoon hostmoon is offline Offline
Newbie Poster

Re: Program security (When Launched)

 
0
  #3
Mar 18th, 2005
You could also use a pseudorandom number calculated by the same means on both the client and server programs. You could pass this via an IPC mechanicsm. Not exactly 'secure', but would keep anybody from randomly executing.

dale
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 36
Reputation: Raven11 is an unknown quantity at this point 
Solved Threads: 1
Raven11 Raven11 is offline Offline
Light Poster

Re: Program security (When Launched)

 
0
  #4
Mar 19th, 2005
I have a idea that will work, once program A is open it will create a .bmp file with encrypted characters. The program B will search for this file and have the correct characters in it. If not it does not open.

However, I want to make it so when Program A is closed, the file is deleted (so program B wont run). How do I delete the bmp file after its been created?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: Program security (When Launched)

 
0
  #5
Mar 20th, 2005
from google

http://www.computing.net/programming...rum/12045.html

  1.  
  2. #include <stdio.h>
  3.  
  4. if(remove("myfile.txt") == -1)
  5.  
  6. fprintf(stderr,"Remove failed");

apparently the remove() function is what you are after.

www.cplusplus.com might have a reference for this function
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC