summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa.c2
-rw-r--r--source3/rpc_server/srv_netlog_nt.c6
-rw-r--r--source3/rpc_server/srv_pipe.c6
-rw-r--r--source3/rpc_server/srv_reg_nt.c4
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c30
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c4
-rw-r--r--source3/rpc_server/srv_util.c6
7 files changed, 29 insertions, 29 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index e3495576c9..a2c2290fb7 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -645,7 +645,7 @@ static BOOL api_lsa_query_info2(pipes_struct *p)
\PIPE\ntlsa commands
***************************************************************************/
-static struct api_struct api_lsa_cmds[] =
+static const struct api_struct api_lsa_cmds[] =
{
{ "LSA_OPENPOLICY2" , LSA_OPENPOLICY2 , api_lsa_open_policy2 },
{ "LSA_OPENPOLICY" , LSA_OPENPOLICY , api_lsa_open_policy },
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 89e46402cf..c3d48a6527 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -105,7 +105,7 @@ NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_C
uint32 pdc_connection_status = 0x0;
uint32 logon_attempts = 0x0;
uint32 tc_status = ERROR_NO_LOGON_SERVERS;
- char *trusted_domain = "test_domain";
+ const char *trusted_domain = "test_domain";
DEBUG(0, ("*** net long ctrl2 %d, %d, %d\n",
q_u->function_code, q_u->query_level, q_u->switch_value));
@@ -132,7 +132,7 @@ NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_C
NTSTATUS _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u)
{
- char *trusted_domain = "test_domain";
+ const char *trusted_domain = "test_domain";
uint32 num_trust_domains = 1;
DEBUG(6,("_net_trust_dom_list: %d\n", __LINE__));
@@ -565,7 +565,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
DEBUG(3,("User:[%s@%s] Requested Domain:[%s]\n", nt_username,
nt_workstation, nt_domain));
- pstrcpy(current_user_info.smb_name, nt_username);
+ fstrcpy(current_user_info.smb_name, nt_username);
sub_set_smb_name(nt_username);
/*
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 5a935be279..8aaab43461 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -457,8 +457,8 @@ failed authentication on named pipe %s.\n", domain, user_name, wks, p->name ));
struct api_cmd
{
- char * pipe_clnt_name;
- char * pipe_srv_name;
+ const char * pipe_clnt_name;
+ const char * pipe_srv_name;
BOOL (*fn) (pipes_struct *);
};
@@ -1173,7 +1173,7 @@ BOOL api_pipe_request(pipes_struct *p)
Calls the underlying RPC function for a named pipe.
********************************************************************/
-BOOL api_rpcTNP(pipes_struct *p, char *rpc_name,
+BOOL api_rpcTNP(pipes_struct *p, const char *rpc_name,
const struct api_struct *api_rpc_cmds)
{
int fn_num;
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 215d468404..cbf237251e 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -80,7 +80,7 @@ static REGISTRY_KEY *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd)
*******************************************************************/
static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY *parent,
- char *subkeyname, uint32 access_granted )
+ const char *subkeyname, uint32 access_granted )
{
REGISTRY_KEY *regkey = NULL;
NTSTATUS result = NT_STATUS_OK;
@@ -341,7 +341,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
{
NTSTATUS status = NT_STATUS_NO_SUCH_FILE;
fstring name;
- char *value_ascii = "";
+ const char *value_ascii = "";
fstring value;
int value_length;
REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol );
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 68a2dcb83d..291ed50ddd 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -42,7 +42,7 @@
/* Table to map the driver version */
/* to OS */
-char * drv_ver_to_os[] = {
+static const char * drv_ver_to_os[] = {
"WIN9X", /* driver version/cversion 0 */
"", /* unused ? */
"WINNT", /* driver version/cversion 2 */
@@ -50,8 +50,8 @@ char * drv_ver_to_os[] = {
};
struct table_node {
- char *long_archi;
- char *short_archi;
+ const char *long_archi;
+ const char *short_archi;
int version;
};
@@ -712,7 +712,7 @@ static void notify_system_time(struct spoolss_notify_msg *msg,
}
struct notify2_message_table {
- char *name;
+ const char *name;
void (*fn)(struct spoolss_notify_msg *msg,
SPOOL_NOTIFY_INFO_DATA *data, TALLOC_CTX *mem_ctx);
};
@@ -1708,7 +1708,7 @@ static BOOL convert_printer_driver_info(const SPOOL_PRINTER_DRIVER_INFO_LEVEL *u
return result;
}
-BOOL convert_devicemode(char *printername, const DEVICEMODE *devmode,
+BOOL convert_devicemode(const char *printername, const DEVICEMODE *devmode,
NT_DEVICEMODE **pp_nt_devmode)
{
NT_DEVICEMODE *nt_devmode = *pp_nt_devmode;
@@ -2085,7 +2085,7 @@ done:
***************************************************************************/
static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer,
- char *key, char *value, uint32 *type, uint8 **data,
+ const char *key, const char *value, uint32 *type, uint8 **data,
uint32 *needed, uint32 in_size )
{
REGISTRY_VALUE *val;
@@ -2121,7 +2121,7 @@ static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printe
Internal routine for removing printerdata
***************************************************************************/
-static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value )
+static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value )
{
delete_printer_data( printer->info_2, key, value );
@@ -2132,7 +2132,7 @@ static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key,
Internal routine for storing printerdata
***************************************************************************/
-static WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value,
+static WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
uint32 type, uint8 *data, int real_len )
{
delete_printer_data( printer->info_2, key, value );
@@ -3094,7 +3094,7 @@ static void spoolss_notify_job_status_string(int snum,
* Now we're returning job status codes we just return a "" here. JRA.
*/
- char *p = "";
+ const char *p = "";
pstring temp;
uint32 len;
@@ -3247,7 +3247,7 @@ struct s_notify_info_data_table
{
uint16 type;
uint16 field;
- char *name;
+ const char *name;
uint32 size;
void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -3258,7 +3258,7 @@ struct s_notify_info_data_table
whether the notification data is a pointer to a variable sized
buffer, a one value uint32 or a two value uint32. */
-struct s_notify_info_data_table notify_info_data_table[] =
+static const struct s_notify_info_data_table notify_info_data_table[] =
{
{ PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_SERVER_NAME, "PRINTER_NOTIFY_SERVER_NAME", NOTIFY_STRING, spoolss_notify_server_name },
{ PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PRINTER_NAME, "PRINTER_NOTIFY_PRINTER_NAME", NOTIFY_STRING, spoolss_notify_printer_name },
@@ -4897,11 +4897,11 @@ static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fst
* convert an array of ascii string to a UNICODE string
********************************************************************/
-static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, char *servername)
+static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, const char *servername)
{
int i=0;
int j=0;
- char *v;
+ const char *v;
pstring line;
uint16 *tuary;
@@ -6839,7 +6839,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
/****************************************************************************
****************************************************************************/
-static void fill_port_1(PORT_INFO_1 *port, char *name)
+static void fill_port_1(PORT_INFO_1 *port, const char *name)
{
init_unistr(&port->port_name, name);
}
@@ -6847,7 +6847,7 @@ static void fill_port_1(PORT_INFO_1 *port, char *name)
/****************************************************************************
****************************************************************************/
-static void fill_port_2(PORT_INFO_2 *port, char *name)
+static void fill_port_2(PORT_INFO_2 *port, const char *name)
{
init_unistr(&port->port_name, name);
init_unistr(&port->monitor_name, "Local Monitor");
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 69f82bb96f..e0a575f143 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -128,7 +128,7 @@ static TDB_CONTEXT *share_tdb; /* used for share security descriptors */
BOOL share_info_db_init(void)
{
static pid_t local_pid;
- char *vstring = "INFO/version";
+ const char *vstring = "INFO/version";
int32 vers_id;
if (share_tdb && local_pid == sys_getpid())
@@ -1008,7 +1008,7 @@ static void init_srv_conn_info_0(SRV_CONN_INFO_0 *ss0, uint32 *snum, uint32 *sto
static void init_srv_conn_1_info(CONN_INFO_1 *se1, CONN_INFO_1_STR *str1,
uint32 id, uint32 type,
uint32 num_opens, uint32 num_users, uint32 open_time,
- char *usr_name, char *net_name)
+ const char *usr_name, const char *net_name)
{
init_srv_conn_info1(se1 , id, type, num_opens, num_users, open_time, usr_name, net_name);
init_srv_conn_info1_str(str1, usr_name, net_name);
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index 72a057b91c..4eba9c7d1f 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -485,7 +485,7 @@ NTSTATUS local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
********************************************************************/
NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid)
{
- char *grp_name;
+ const char *grp_name;
int i = -1; /* start do loop at -1 */
do /* find, if it exists, a group rid for the group name*/
@@ -502,9 +502,9 @@ NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid)
/*******************************************************************
Look up a local (BUILTIN) alias name and return a rid
********************************************************************/
-NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid)
+NTSTATUS local_lookup_alias_rid(const char *alias_name, uint32 *rid)
{
- char *als_name;
+ const char *als_name;
int i = -1; /* start do loop at -1 */
do /* find, if it exists, a alias rid for the alias name*/