Re: [vchkpw] vpopmail.h function vauth_user

2004-11-29 Thread Tom Collins
On Nov 29, 2004, at 4:29 AM, Ferdinand Hackl wrote:
gcc vauth.c -o vauth
You need to include the libraries:
gcc -Wall -o auth auth.c `cat /home/vpopmail/etc/lib_deps`
#include 
#include 
You don't need to include vauth.h.  The path to vpopmail.h should be in 
quotes.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


[vchkpw] vpopmail.h function vauth_user

2004-11-29 Thread Ferdinand Hackl
hi there,

i try to write a program ( see below ) to provide a command line tool for
checking a userĀ“s pwd with vpopmails function vauth_user. I am a C noob so i
am confused why vauth_user raise an "undefinde reference" error when i
include vpopmail.h - Do i have to use another vpopmail function for this ?

many thanks for an answer

Ferdinand Hackl


gcc vauth.c -o vauth
/tmp/cckIJsgT.o(.text+0x6d): In function `main':
: undefined reference to `vauth_user'
collect2: ld returned 1 exit status

 vauth.c---

#include 
#include 
#include 
#include 
#include 


#define MAX_BUFF 80

static struct vqpasswd *pw;

int main()
{

   char Username[MAX_BUFF];
   char Domain[MAX_BUFF];
   char Password[MAX_BUFF];

   strcpy (Username, "test");
   strcpy (Domain , "foo.bar");
   strcpy (Password , "test");
   pw = vauth_user( Username, Domain, Password, "" );
   return 0;
}