| 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*/
|
|---|
| 35 | void usage();
|
|---|
| 36 | int process_cmd_line(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, int argc, char **argv);
|
|---|
| 37 | void mgr_getline(fstring line);
|
|---|
| 38 | void mgr_page(uint32 line_count);
|
|---|
| 39 | uint32 rid_or_name(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, uint32 *rid, char **name);
|
|---|
| 40 | char *get_new_password(TALLOC_CTX *mem_ctx);
|
|---|
| 41 | void printerr(const char *msg, NTSTATUS status);
|
|---|
| 42 | void print_rid_list(uint32 *rids, char **names, uint32 num_rids);
|
|---|
| 43 | void print_lookup_records(CacLookupRidsRecord *map, uint32 num_rids);
|
|---|
| 44 | int list_groups(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
|
|---|
| 45 | void list_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
|
|---|
| 46 | void add_privs(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, CacUserInfo *info);
|
|---|
| 47 | void list_users(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd);
|
|---|
| 48 |
|
|---|
| 49 | void 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*/
|
|---|
| 60 | void group_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *group_hnd);
|
|---|
| 61 |
|
|---|
| 62 | /*mgr_user.c*/
|
|---|
| 63 | void user_menu(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *dom_hnd, POLICY_HND *user_hnd);
|
|---|
| 64 |
|
|---|
| 65 | #endif /*CACUSERMGR_H_*/
|
|---|