Lines Matching refs:hnd
6 void fill_conn_info(CacServerHandle *hnd) {
24 hnd->domain = SMB_STRDUP(domain);
25 hnd->username = SMB_STRDUP(username);
26 hnd->password = SMB_STRDUP(password);
27 hnd->server = SMB_STRDUP(server);
31 CacServerHandle *hnd = NULL;
38 hnd = cac_NewServerHandle(False);
41 cac_SetAuthDataFn(hnd, cac_GetAuthDataFn);
43 hnd->debug = 0;
45 fill_conn_info(hnd);
48 if(!cac_Connect(hnd, NULL)) {
49 fprintf(stderr, "Could not connect to server. \n Error %s\n errno(%d): %s\n", nt_errstr(hnd->status), errno, strerror(errno));
50 cac_FreeHandle(hnd);
61 if(!cac_LsaOpenPolicy(hnd, mem_ctx, &op)) {
62 fprintf(stderr, "Could not open policy.\n Error: %s.errno: %d.\n", nt_errstr(hnd->status), errno);
63 cac_FreeHandle(hnd);
71 if(!cac_LsaClosePolicy(hnd, mem_ctx, op.out.pol)) {
72 fprintf(stderr, "Could not close policy. Error: %s\n", nt_errstr(hnd->status));
79 cac_FreeHandle(hnd);