• 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

66 CacUserInfo *modify_user_info(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *user_hnd) {
78 if(!cac_SamGetUserInfo(hnd, mem_ctx, &getinfo)) {
79 printerr("Could not get user info.", hnd->status);
155 if(!cac_SamSetUserInfo(hnd, mem_ctx, &setinfo)) {
156 printerr("Could not set user info.", hnd->status);
162 void add_user_to_group(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info, POLICY_HND *dom_hnd) {
177 rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &og.in.rid, &tmp);
179 if(!cac_SamOpenGroup(hnd, mem_ctx, &og)) {
180 printerr("Could not open group.", hnd->status);
187 if(!cac_SamAddGroupMember(hnd, mem_ctx, &add)) {
188 printerr("Could not add user to group.", hnd->status);
191 cac_SamClose(hnd, mem_ctx, og.out.group_hnd);
194 void remove_user_from_group(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info, POLICY_HND *dom_hnd) {
209 rid_type = rid_or_name(hnd, mem_ctx, dom_hnd, &og.in.rid, &tmp);
211 if(!cac_SamOpenGroup(hnd, mem_ctx, &og)) {
212 printerr("Could not open group.", hnd->status);
219 if(!cac_SamRemoveGroupMember(hnd, mem_ctx, &del)) {
220 printerr("Could not add user to group.", hnd->status);
223 cac_SamClose(hnd, mem_ctx, og.out.group_hnd);
226 void user_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *user_hnd) {
236 if(!hnd || !mem_ctx || !user_hnd) {
245 if(!cac_SamGetUserInfo(hnd, mem_ctx, &getinfo)) {
246 printerr("Could not get info.", hnd->status);
287 if(!cac_SamGetGroupsForUser(hnd, mem_ctx, &groups)) {
288 printerr("Could not get groups.", hnd->status);
297 if(!cac_SamGetNamesFromRids(hnd, mem_ctx, &gnfr)) {
298 printerr("Could not map RIDs to names.", hnd->status);
316 if(!cac_SamSetPassword(hnd, mem_ctx, &setpass)) {
317 printerr("Could not set password.", hnd->status);
329 if(!cac_SamEnableUser(hnd, mem_ctx, user_hnd)) {
330 printerr("Could not enable user.", hnd->status);
344 if(!cac_SamDisableUser(hnd, mem_ctx, user_hnd)) {
345 printerr("Could not disable user.", hnd->status);
359 if(!cac_SamGetUserInfo(hnd, mem_ctx, &getinfo)) {
360 printerr("Could not get info.", hnd->status);
372 info = modify_user_info(hnd, mem_ctx, user_hnd);
380 list_groups(hnd, mem_ctx, dom_hnd);
385 add_user_to_group(hnd, mem_ctx, info, dom_hnd);
390 remove_user_from_group(hnd, mem_ctx, info, dom_hnd);
395 if(!cac_SamDeleteUser(hnd, mem_ctx, user_hnd))
396 printerr("Could not delete user.", hnd->status);
415 cac_SamClose(hnd, mem_ctx, user_hnd);