1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

WARNING! MOVED rpc_server/srv_lsa_hnd.c TO lib/util_hnd.c

CVS UPDATE MAY ISSUE WARNING ABOUT lib/util_hnd.c MODIFICATION
DATE BEING IN THE FUTURE.  CVS CHECKOUT A NEW REPOSITORY MAY BE
SAFER.
(This used to be commit c26e8a6ac59934ae580077df937439c2c538dbdb)
This commit is contained in:
Luke Leighton 1999-11-24 18:15:50 +00:00
parent d7889cd223
commit 2752e372b6
5 changed files with 29 additions and 28 deletions

View File

@ -112,7 +112,8 @@ LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \
lib/util_str.o lib/util_unistr.o \
lib/util_file.o mem_man/mem_man.o \
lib/util_sock.o lib/unix_sec_ctxt.o \
lib/util_array.o
lib/util_array.o \
lib/util_hnd.o
UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \
ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o
@ -126,7 +127,6 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/namequery.o libsmb/nmblib.o \
RPC_SERVER_OBJ = \
rpc_server/srv_lsa.o \
rpc_server/srv_lsa_hnd.o \
rpc_server/srv_netlog.o \
rpc_server/srv_pipe_hnd.o \
rpc_server/srv_reg.o \

View File

@ -526,6 +526,23 @@ char *fgets_slash(char *s2,int maxlen,FILE *f);
BOOL file_modified(const char *filename, time_t *lastmodified);
void *open_file_if_modified(const char *filename, char *mode, time_t *lastmodified);
/*The following definitions come from lib/util_hnd.c */
BOOL init_policy_hnd(int num_pol_hnds);
BOOL open_policy_hnd(POLICY_HND *hnd);
int find_policy_by_hnd(POLICY_HND *hnd);
BOOL set_policy_samr_rid(POLICY_HND *hnd, uint32 rid);
BOOL set_policy_samr_pol_status(POLICY_HND *hnd, uint32 pol_status);
BOOL set_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid);
BOOL get_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid);
uint32 get_policy_samr_rid(POLICY_HND *hnd);
BOOL set_policy_reg_name(POLICY_HND *hnd, fstring name);
BOOL get_policy_reg_name(POLICY_HND *hnd, fstring name);
BOOL set_policy_cli_state(POLICY_HND *hnd, struct cli_state *cli, uint16 fnum,
void (*free_fn)(struct cli_state *, uint16));
BOOL get_policy_cli_state(POLICY_HND *hnd, struct cli_state **cli, uint16 *fnum);
BOOL close_policy_hnd(POLICY_HND *hnd);
/*The following definitions come from lib/util_pwdb.c */
uint32 lookup_wk_group_name(const char *group_name, const char *domain,
@ -3500,23 +3517,6 @@ uint32 lookup_name(char *name, DOM_SID *sid, uint8 *type);
BOOL api_ntlsa_rpc(pipes_struct *p, prs_struct *data);
/*The following definitions come from rpc_server/srv_lsa_hnd.c */
void init_policy_hnd(int num_pol_hnds);
BOOL open_policy_hnd(POLICY_HND *hnd);
int find_policy_by_hnd(POLICY_HND *hnd);
BOOL set_policy_samr_rid(POLICY_HND *hnd, uint32 rid);
BOOL set_policy_samr_pol_status(POLICY_HND *hnd, uint32 pol_status);
BOOL set_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid);
BOOL get_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid);
uint32 get_policy_samr_rid(POLICY_HND *hnd);
BOOL set_policy_reg_name(POLICY_HND *hnd, fstring name);
BOOL get_policy_reg_name(POLICY_HND *hnd, fstring name);
BOOL set_policy_cli_state(POLICY_HND *hnd, struct cli_state *cli, uint16 fnum,
void (*free_fn)(struct cli_state *, uint16));
BOOL get_policy_cli_state(POLICY_HND *hnd, struct cli_state **cli, uint16 *fnum);
BOOL close_policy_hnd(POLICY_HND *hnd);
/*The following definitions come from rpc_server/srv_netlog.c */
BOOL api_netlog_rpc(pipes_struct *p, prs_struct *data);

View File

@ -101,12 +101,11 @@ static void create_pol_hnd(POLICY_HND *hnd)
/****************************************************************************
initialise policy handle states...
****************************************************************************/
void init_policy_hnd(int num_pol_hnds)
BOOL init_policy_hnd(int num_pol_hnds)
{
bmap = bitmap_allocate(num_pol_hnds);
if (!bmap) {
exit_server("out of memory in init_policy_hnd\n");
}
return bmap != NULL;
}
/****************************************************************************

View File

@ -101,12 +101,11 @@ static void create_pol_hnd(POLICY_HND *hnd)
/****************************************************************************
initialise policy handle states...
****************************************************************************/
void init_policy_hnd(int num_pol_hnds)
BOOL init_policy_hnd(int num_pol_hnds)
{
bmap = bitmap_allocate(num_pol_hnds);
if (!bmap) {
exit_server("out of memory in init_policy_hnd\n");
}
return bmap != NULL;
}
/****************************************************************************

View File

@ -476,7 +476,10 @@ static void init_structs(void)
conn_init();
file_init();
init_rpc_pipe_hnd(); /* for RPC pipes */
init_policy_hnd(MAX_SERVER_POLICY_HANDLES); /* for policy handles */
if (!init_policy_hnd(MAX_SERVER_POLICY_HANDLES))
{
exit_server("could not allocate policy handles\n");
}
init_printer_hnd(); /* for SPOOLSS handles */
init_dptrs();
init_dfs_table();