summaryrefslogtreecommitdiff
path: root/examples/libmsrpc/cacusermgr/cacusermgr.h
blob: 84c60eb17cdd0de2bfa2e5b2faaae8394b32d628 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Unix SMB/CIFS implementation. 
 * cacusermgr definitions and includes.
 *
 * Copyright (C) Chris Nicholls     2005
 * 
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 3 of the License, or (at your
 * option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, see <http://www.gnu.org/licenses/>.  */

#ifndef CACUSERMGR_H_
#define CACUSERMGR_H_

#include "libmsrpc.h"
#include "includes.h"

/*used for the simple pager - mgr_page()*/
#define DEFAULT_SCREEN_LINES 20 

/**************
 * prototypes *
 **************/

/*util.c*/
void usage();
int process_cmd_line(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, int argc, char **argv);
void mgr_getline(fstring line);
void mgr_page(uint32 line_count);
uint32 rid_or_name(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, uint32 *rid, char **name);
char *get_new_password(TALLOC_CTX *mem_ctx);
void printerr(const char *msg, NTSTATUS status);
void print_rid_list(uint32 *rids, char **names, uint32 num_rids);
void print_lookup_records(CacLookupRidsRecord *map, uint32 num_rids);
int list_groups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
void list_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
void add_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
void list_users(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);

void mgr_GetAuthDataFn(const char * pServer,
                 const char * pShare,
                 char * pWorkgroup,
                 int maxLenWorkgroup,
                 char * pUsername,
                 int maxLenUsername,
                 char * pPassword,
                 int maxLenPassword);


/*mgr_group.c*/
void group_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *group_hnd);

/*mgr_user.c*/
void user_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *user_hnd);

#endif /*CACUSERMGR_H_*/