File: test.c

package info (click to toggle)
pam 0.79-5%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 3,248 kB
  • ctags: 1,934
  • sloc: ansic: 21,131; makefile: 1,504; sh: 571; perl: 400; yacc: 398
file content (27 lines) | stat: -rw-r--r-- 510 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <dlfcn.h>
#include <unistd.h>

#include <security/pam_appl.h>
#include <security/pam_misc.h>

int main(int argc, char **argv)
{
    void *handle;

    handle = dlopen("./pam.so", RTLD_NOW);
    if (handle == NULL) {
	fprintf(stderr, "failed to load pam.so: %s\n", dlerror());
	exit(1);
    }

    /* handle->XXX points to each of the PAM functions */
    
    
    if (dlclose(handle)) {
	fprintf(stderr, "failed to unload pam.so: %s\n", dlerror());
	exit(1);
    }

    exit(0);
}