1/*
2 * Unix SMB/CIFS implementation.
3 * cacusermgr definitions and includes.
4 *
5 * Copyright (C) Chris Nicholls     2005
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15 * more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc., 675
19 * Mass Ave, Cambridge, MA 02139, USA.  */
20
21#ifndef CACUSERMGR_H_
22#define CACUSERMGR_H_
23
24#include "libmsrpc.h"
25#include "includes.h"
26
27/*used for the simple pager - mgr_page()*/
28#define DEFAULT_SCREEN_LINES 20
29
30/**************
31 * prototypes *
32 **************/
33
34/*util.c*/
35void usage();
36int process_cmd_line(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, int argc, char **argv);
37void mgr_getline(fstring line);
38void mgr_page(uint32 line_count);
39uint32 rid_or_name(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, uint32 *rid, char **name);
40char *get_new_password(TALLOC_CTX *mem_ctx);
41void printerr(const char *msg, NTSTATUS status);
42void print_rid_list(uint32 *rids, char **names, uint32 num_rids);
43void print_lookup_records(CacLookupRidsRecord *map, uint32 num_rids);
44int list_groups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
45void list_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
46void add_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
47void list_users(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
48
49void mgr_GetAuthDataFn(const char * pServer,
50                 const char * pShare,
51                 char * pWorkgroup,
52                 int maxLenWorkgroup,
53                 char * pUsername,
54                 int maxLenUsername,
55                 char * pPassword,
56                 int maxLenPassword);
57
58
59/*mgr_group.c*/
60void group_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *group_hnd);
61
62/*mgr_user.c*/
63void user_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *user_hnd);
64
65#endif /*CACUSERMGR_H_*/
66