• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/samba-3.0.25b/examples/libmsrpc/test/sam/

Lines Matching refs:hnd

7    CacServerHandle *hnd = NULL;
36 hnd = cac_NewServerHandle(True);
38 cac_parse_cmd_line(argc, argv, hnd);
40 if(!cac_Connect(hnd, NULL)) {
41 fprintf(stderr, "Could not connect to server %s. Error: %s\n", hnd->server, nt_errstr(hnd->status));
50 if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
51 fprintf(stderr, "Could not open domain. Error: %s\n", nt_errstr(hnd->status));
85 cac_SamClose(hnd, mem_ctx, group_hnd);
98 if(!cac_SamCreateGroup(hnd, mem_ctx, &cg)) {
99 fprintf(stderr, "Could not create group. Error: %s\n", nt_errstr(hnd->status));
111 cac_SamClose(hnd, mem_ctx, group_hnd);
123 if(!cac_SamOpenGroup(hnd, mem_ctx, &og)) {
124 fprintf(stderr, "Could not open group. Error: %s\n", nt_errstr(hnd->status));
137 while(cac_SamEnumGroups(hnd, mem_ctx, &eg)) {
143 if(CAC_OP_FAILED(hnd->status)) {
144 printf("Could not enumerate Groups. Error: %s\n", nt_errstr(hnd->status));
158 if(!cac_SamGetGroupMembers(hnd, mem_ctx, &ggm)) {
159 fprintf(stderr, "Could not get group members. Error: %s\n", nt_errstr(hnd->status));
173 if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &gn)) {
174 fprintf(stderr, "Could not lookup names. Error: %s\n", nt_errstr(hnd->status));
190 if(!cac_SamDeleteGroup(hnd, mem_ctx, group_hnd)) {
191 fprintf(stderr, "Could not delete group. Error: %s\n", nt_errstr(hnd->status));
204 while(cac_SamEnumUsers(hnd, mem_ctx, &eu)) {
210 if(CAC_OP_FAILED(hnd->status)) {
211 printf("Could not enumerate users. Error: %s\n", nt_errstr(hnd->status));
229 if(!cac_SamAddGroupMember(hnd, mem_ctx, &add)) {
230 fprintf(stderr, "Could not add user to group. Error: %s\n", nt_errstr(hnd->status));
249 if(!cac_SamRemoveGroupMember(hnd, mem_ctx, &del)) {
250 fprintf(stderr, "Could not remove user from group. Error: %s\n", nt_errstr(hnd->status));
264 if(!cac_SamClearGroupMembers(hnd, mem_ctx, group_hnd)) {
265 fprintf(stderr, "Could not clear group members. Error: %s\n", nt_errstr(hnd->status));
293 if(!cac_SamSetGroupMembers(hnd, mem_ctx, &set)) {
294 printf("could not set members. Error: %s\n", nt_errstr(hnd->status));
320 if(!cac_SamOpenUser(hnd, mem_ctx, &ou)) {
321 fprintf(stderr, "Could not open user %s. Error: %s\n", ou.in.name, nt_errstr(hnd->status));
328 if(!cac_SamGetGroupsForUser(hnd, mem_ctx, &gg)) {
329 fprintf(stderr, "Could not get groups for user. Error: %s\n", nt_errstr(hnd->status));
333 cac_SamClose(hnd, mem_ctx, ou.out.user_hnd);
341 if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &gn)) {
342 fprintf(stderr, "Could not get names from RIDs. Error: %s\n", nt_errstr(hnd->status));
365 if(!cac_SamClose(hnd, mem_ctx, group_hnd)) {
382 if(!cac_SamGetGroupInfo(hnd, mem_ctx, &gi)) {
383 printf("Could not get group info. Error: %s\n", nt_errstr(hnd->status));
403 if(!cac_SamGetGroupInfo(hnd, mem_ctx, &gi)) {
404 printf("Could not get group info. Error: %s\n", nt_errstr(hnd->status));
413 if(!cac_SamSetGroupInfo(hnd, mem_ctx, &si)) {
414 printf("Could not set group info. Error: %s\n", nt_errstr(hnd->status));
436 if(!cac_SamRenameGroup(hnd, mem_ctx, &rg))
437 printf("Could not rename group. Error: %s\n", nt_errstr(hnd->status));
452 if(!cac_SamGetSecurityObject(hnd, mem_ctx, &gso)) {
453 printf("Could not get security descriptor info. Error: %s\n", nt_errstr(hnd->status));
468 cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
471 cac_SamClose(hnd, mem_ctx, group_hnd);
474 cac_FreeHandle(hnd);