summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-03-05 01:30:26 +0000
committerJeremy Allison <jra@samba.org>2003-03-05 01:30:26 +0000
commit1cdafbf17ebbcb1840cdb1bde3b49600406ed904 (patch)
tree2799f3de244e1c62c34c12b516630fa0970d69d1 /source3
parentfe45e6d79a61df5f25e461603ff93c563da186b7 (diff)
downloadsamba-1cdafbf17ebbcb1840cdb1bde3b49600406ed904.tar.gz
samba-1cdafbf17ebbcb1840cdb1bde3b49600406ed904.tar.bz2
samba-1cdafbf17ebbcb1840cdb1bde3b49600406ed904.zip
Writable string const fixes.
Jeremy. (This used to be commit 60b0cfc8a5b6275d3460ebc6bf17d0f08e25b67e)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c2
-rw-r--r--source3/printing/lpq_parse.c2
-rw-r--r--source3/printing/nt_printing.c18
3 files changed, 14 insertions, 8 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 62b94761ad..18ce5e4bd9 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -1263,7 +1263,7 @@ BOOL get_dc_list(const char *domain, struct in_addr **ip_list, int *count, int *
/* If it's our domain then use the 'password server' parameter. */
if (strequal(domain, lp_workgroup())) {
- char *p;
+ const char *p;
char *pserver = lp_passwordserver(); /* UNIX charset. */
fstring name;
int num_addresses = 0;
diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c
index 4b91b8ac9a..0b4ce4b4ca 100644
--- a/source3/printing/lpq_parse.c
+++ b/source3/printing/lpq_parse.c
@@ -592,7 +592,7 @@ static BOOL parse_lpq_qnx(char *line,print_queue_struct *buf,BOOL first)
{
fstring tok[7];
int count=0;
- const char *cline;
+ const char *cline = line;
DEBUG(4,("antes [%s]\n", line));
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 4c454ef111..6df2c6b445 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1075,6 +1075,7 @@ static uint32 get_correct_cversion(fstring architecture, fstring driverpath_in,
NTSTATUS nt_status;
pstring driverpath;
DATA_BLOB null_pw;
+ fstring res_type;
files_struct *fsp = NULL;
BOOL bad_path;
SMB_STRUCT_STAT st;
@@ -1098,8 +1099,9 @@ static uint32 get_correct_cversion(fstring architecture, fstring driverpath_in,
/* Null password is ok - we are already an authenticated user... */
null_pw = data_blob(NULL, 0);
+ fstrcpy(res_type, "A:");
become_root();
- conn = make_connection_with_chdir("print$", null_pw, "A:", user->vuid, &nt_status);
+ conn = make_connection_with_chdir("print$", null_pw, res_type, user->vuid, &nt_status);
unbecome_root();
if (conn == NULL) {
@@ -1389,6 +1391,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
NTSTATUS nt_status;
pstring inbuf;
pstring outbuf;
+ fstring res_type;
int ver = 0;
int i;
@@ -1413,9 +1416,10 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
* Note we must be root to do this.
*/
- become_root();
null_pw = data_blob(NULL, 0);
- conn = make_connection_with_chdir("print$", null_pw, "A:", user->vuid, &nt_status);
+ fstrcpy(res_type, "A:");
+ become_root();
+ conn = make_connection_with_chdir("print$", null_pw, res_type, user->vuid, &nt_status);
unbecome_root();
if (conn == NULL) {
@@ -4308,7 +4312,8 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
connection_struct *conn;
DATA_BLOB null_pw;
NTSTATUS nt_status;
-
+ fstring res_type;
+
if ( !info_3 )
return False;
@@ -4320,9 +4325,10 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct
* do this.
*/
- become_root();
null_pw = data_blob( NULL, 0 );
- conn = make_connection_with_chdir( "print$", null_pw, "A:", user->vuid, &nt_status );
+ fstrcpy(res_type, "A:");
+ become_root();
+ conn = make_connection_with_chdir( "print$", null_pw, res_type, user->vuid, &nt_status );
unbecome_root();
if ( !conn ) {