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

Lines Matching refs:hnd

26 void create_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd) {
33 if(!hnd || !mem_ctx || !dom_hnd) {
63 if(!cac_SamCreateUser(hnd, mem_ctx, &cu)) {
64 printerr("Could not create user.", hnd->status);
67 user_menu(hnd, mem_ctx, dom_hnd, cu.out.user_hnd);
84 if(!cac_SamCreateGroup(hnd, mem_ctx, &cg)) {
85 printerr("Could not create group.", hnd->status);
88 group_menu(hnd, mem_ctx, dom_hnd, cg.out.group_hnd);
114 if(!cac_SamCreateUser(hnd, mem_ctx, &cu)) {
115 printerr("Could not create account.", hnd->status);
118 user_menu(hnd, mem_ctx, dom_hnd, cu.out.user_hnd);
140 void main_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd) {
154 if(!hnd || !mem_ctx || !dom_hnd) {
186 rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &rid, &name);
194 if(!cac_SamOpenUser(hnd, mem_ctx, &openu))
195 printerr("Could not open user.", hnd->status);
197 user_menu(hnd, mem_ctx, dom_hnd, openu.out.user_hnd);
199 if(!cac_SamFlush(hnd, mem_ctx, &flush)) {
200 printerr("Lost handle while flushing SAM.", hnd->status);
212 if(!cac_SamOpenGroup(hnd, mem_ctx, &openg))
213 printerr("Could not open group.", hnd->status);
215 group_menu(hnd, mem_ctx, dom_hnd, openg.out.group_hnd);
217 if(!cac_SamFlush(hnd, mem_ctx, &flush)) {
218 printerr("Lost handle while flushing SAM.", hnd->status);
232 create_menu(hnd, mem_ctx, dom_hnd);
233 if(!cac_SamFlush(hnd, mem_ctx, &flush)) {
234 printerr("Lost handle while flushing SAM.", hnd->status);
247 while(cac_SamEnumUsers(hnd, mem_ctx, &enumu)) {
250 if(CAC_OP_FAILED(hnd->status))
251 printerr("Error occured while enumerating users.", hnd->status);
259 while(cac_SamEnumGroups(hnd, mem_ctx, &enumg)) {
263 if(CAC_OP_FAILED(hnd->status))
264 printerr("Error occured while enumerating groups.", hnd->status);
274 while(cac_SamEnumUsers(hnd, mem_ctx, &enumu)) {
277 if(CAC_OP_FAILED(hnd->status))
278 printerr("Error occured while enumerating accounts.", hnd->status);
293 CacServerHandle *hnd = NULL;
305 hnd = cac_NewServerHandle(True);
306 if(!hnd) {
312 if(!process_cmd_line(hnd, mem_ctx, argc, argv))
315 if(!cac_Connect(hnd, NULL)) {
316 printf("Could not connect to server %s. %s\n", hnd->server, nt_errstr(hnd->status));
324 if(!cac_SamOpenDomain(hnd, mem_ctx, &sod)) {
325 printf("Could not open handle to domain SAM. %s\n", nt_errstr(hnd->status));
329 main_menu(hnd, mem_ctx, sod.out.dom_hnd);
334 cac_SamClose(hnd, mem_ctx, sod.out.dom_hnd);
337 cac_SamClose(hnd, mem_ctx, sod.out.sam);
339 cac_FreeHandle(hnd);