Hi,
I want to build a loadable authentication module on AIX 4.3.3.The operations are:
1 cc -c SAMBA.c
success
2 ld -o SAMBA SAMBA.o -bM:SRE -e SAMBA_initialize
error£º
ld: 0711-327 WARNING: Entry point not found: SAMBA_initialize
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
Can anyone give me some advice?
the SAMBA.C
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <pwd.h>
#include <usersec.h>
/* the smb authentication method */
static int SAMBA_authenticate(char* ntuser,
char* passwd,
int* reenter,
char** msg)
{
#ifdef SMB_DEBUG
printf("user : %s, password : %s\n", ntuser, passwd);
#endif
*reenter = 0;
printf("SAMBA: authentication ok for user : %s\n", ntuser);
return 0;
}
/*
* This is the module entry point
*
* Note : I'm not sure the prototype is correct (it's why I added the
"..."
* as second parameter). I'm not even sure the return value is
meaningfull.
*/
int SAMBA_initialize(struct secmethod_table* method, ...)
{
memset(method, 0, sizeof(*method)); /* should I do that ??? */
/* set the authentication routine */
method->method_authenticate = SAMBA_authenticate;
/* do I have to fill the other method ??? */
/* meaningfull ??? */
return 0;
}
I want to build a loadable authentication module on AIX 4.3.3.The operations are:
1 cc -c SAMBA.c
success
2 ld -o SAMBA SAMBA.o -bM:SRE -e SAMBA_initialize
error£º
ld: 0711-327 WARNING: Entry point not found: SAMBA_initialize
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
Can anyone give me some advice?
the SAMBA.C
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <pwd.h>
#include <usersec.h>
/* the smb authentication method */
static int SAMBA_authenticate(char* ntuser,
char* passwd,
int* reenter,
char** msg)
{
#ifdef SMB_DEBUG
printf("user : %s, password : %s\n", ntuser, passwd);
#endif
*reenter = 0;
printf("SAMBA: authentication ok for user : %s\n", ntuser);
return 0;
}
/*
* This is the module entry point
*
* Note : I'm not sure the prototype is correct (it's why I added the
"..."
* as second parameter). I'm not even sure the return value is
meaningfull.
*/
int SAMBA_initialize(struct secmethod_table* method, ...)
{
memset(method, 0, sizeof(*method)); /* should I do that ??? */
/* set the authentication routine */
method->method_authenticate = SAMBA_authenticate;
/* do I have to fill the other method ??? */
/* meaningfull ??? */
return 0;
}